Liking cljdoc? Tell your friends :D

clojure-lsp.refactor.transform


as->referclj

(as->refer loc uri db)

can-as->refer?clj

(can-as->refer? loc)

can-create-function?clj

(can-create-function? zloc)

can-create-test?clj

(can-create-test? zloc uri db)

can-demote-fn?clj

(can-demote-fn? zloc)

can-extract-to-def?clj

(can-extract-to-def? zloc)

can-inline-fn?clj

(can-inline-fn? zloc uri db)

returns true if a function can be inlined; false otherwise

returns true if a function can be inlined; false otherwise
raw docstring

can-move-to-:let?clj

(can-move-to-:let? zloc)

can-promote-fn?clj

(can-promote-fn? zloc)

can-refer->as?clj

(can-refer->as? loc)

can-thread-list?clj

(can-thread-list? zloc)

can-thread?clj

(can-thread? zloc)

can-unwind-thread?clj

(can-unwind-thread? zloc)

change-collclj

(change-coll zloc coll)

Change collection to specified collection

Change collection to specified collection
raw docstring

common-var-definition-symbolsclj


cond->ifclj

(cond->if zloc)

transforms a cond form into an equivalent if form

transforms a cond form into an equivalent if form
raw docstring

create-functionclj

(create-function local-zloc uri db)

create-testclj

(create-test zloc uri db {:keys [producer]})

cycle-collclj

(cycle-coll zloc)

Cycles collection between vector, list, map and set

Cycles collection between vector, list, map and set
raw docstring

cycle-privacyclj

(cycle-privacy zloc db)

demote-fnclj

(demote-fn zloc)

expand-letclj

(expand-let zloc uri db)
(expand-let zloc expand-to-top? uri db)

Expand the scope of the next let up the tree.

Expand the scope of the next let up the tree.
raw docstring

extract-functionclj

(extract-function row-start
                  col-start
                  end-row
                  end-col
                  sel-start-zloc
                  sel-end-zloc
                  uri
                  fn-name
                  db)

Extract selected expressions to a new function and replace with a function call. If no selection, extract the expression to the right. When selection start and end zlocs don't have the same parent or no expressions are found, return an error.

Extract selected expressions to a new function and replace with a function call. If no selection, extract
the expression to the right.  When selection start and end zlocs don't have the same parent or no expressions are
found, return an error.
raw docstring

extract-to-defclj

(extract-to-def zloc def-name db)

find-function-formclj

(find-function-form zloc)

find-let-formclj

(find-let-form zloc uri db)

Finds a let-form that would be valid to move zloc to

Finds a let-form that would be valid to move zloc to
raw docstring

find-other-collsclj

(find-other-colls zloc)

find-public-function-to-createclj

(find-public-function-to-create zloc uri db)

find-withinclj

(find-within zloc p?)

if->condclj

(if->cond zloc)

transforms an if form into an equivalent cond form

transforms an if form into an equivalent cond form
raw docstring

inline-functionclj

(inline-function zloc uri db)

copies the function body to the call sites, substituting formal parameters with the actual parameters from the call site. call sites are outside of the current file. Limitations:

  • functions with destructuring will return an error
  • multi-arity functions are disallowed (although varargs are allowed)
  • recursive functions will inline with the recursive calls still present
  • functions that have side effects may have incorrect behavior
  • only works with functions contained in the file with the definition
  • when a call site uses threading or otherwise doesn't list all the arguments explictly, the arguments are not adjusted
copies the function body to the call sites, substituting formal parameters
with the actual parameters from the call site.
call sites are outside of the current file.  Limitations:
 - functions with destructuring will return an error
 - multi-arity functions are disallowed (although varargs are allowed)
 - recursive functions will inline with the recursive calls still present
 - functions that have side effects may have incorrect behavior
 - only works with functions contained in the file with the definition
 - when a call site uses threading or otherwise doesn't list
   all the arguments explictly, the arguments are not adjusted
raw docstring

introduce-letclj

(introduce-let zloc binding-name)

Adds a let around the current form.

Adds a let around the current form.
raw docstring

move-to-for-letclj

(move-to-for-let zloc _uri _db binding-name)

Adds form and symbol to a :let in a for/doseq further up the tree

Adds form and symbol to a :let in a for/doseq further up the tree
raw docstring

move-to-letclj

(move-to-let zloc uri db binding-name)

Adds form and symbol to a let further up the tree

Adds form and symbol to a let further up the tree
raw docstring

multi-arity-fn-definition?clj

(multi-arity-fn-definition? zloc)

near-cond?clj

(near-cond? zloc)

return true if nearby a 'cond', otherwise return false

return true if nearby a 'cond', otherwise return false
raw docstring

near-if?clj

(near-if? zloc)

return true if nearby an 'if', otherwise return false

return true if nearby an 'if', otherwise return false
raw docstring

new-defn-zlocclj

(new-defn-zloc fn-name private? params body db)

prepend-preserving-commentclj

(prepend-preserving-comment existing-loc new-loc)

Returns an edit that places new-loc before existing-loc, keeping any comments or whitespace that preceed existing-loc close to it.

Returns an edit that places `new-loc` before `existing-loc`, keeping any
comments or whitespace that preceed `existing-loc` close to it.
raw docstring

promote-fnclj

(promote-fn zloc uri db fn-name)

refer->asclj

(refer->as loc uri db)

replace-in-bind-valuesclj

(replace-in-bind-values first-bind p? replacement)

resultclj

(result zip-edits)

shadowing-boundry?clj

(shadowing-boundry? target top)

shadowing-exprsclj


suppress-diagnosticclj

(suppress-diagnostic zloc diagnostic-code)

thread-allclj

(thread-all zloc sym db)

thread-firstclj

(thread-first zloc db)

thread-first-allclj

(thread-first-all zloc db)

thread-first-symbolsclj


thread-invalid-symbolsclj


thread-lastclj

(thread-last zloc db)

thread-last-allclj

(thread-last-all zloc db)

thread-last-symbolsclj


thread-symbolsclj


unwind-allclj

(unwind-all zloc)

unwind-threadclj

(unwind-thread zloc)

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close