(->position [row col])
(->range start end)
(assert-contains-submaps maps result)
Asserts that maps are contained submaps of result in results.
Asserts that maps are contained submaps of result in results.
(assert-no-take c timeout-ms)
(assert-submap expected actual)
(assert-submaps maps result)
Asserts that maps are submaps of result in corresponding order and
that the number of maps corresponds to the number of results. If
MAPS is a set
, don't check for order. Returns true if all
assertions passed (useful for REPL).
taken from kondo and also adapted for set
s.
Asserts that maps are submaps of result in corresponding order and that the number of maps corresponds to the number of results. If MAPS is a `set`, don't check for order. Returns true if all assertions passed (useful for REPL). taken from kondo and also adapted for `set`s.
(changes->code changes db)
(changes->code changes uri db)
(changes-by-uri->code changes-by-uri uri db)
(code & strings)
(components)
(db)
(db*)
(delete-file uri)
(edits-as-strings edits)
(file-path path)
(file-uri uri)
(first-edit-as-root-string [{:keys [loc]}])
(lf->sys text)
Returns TEXT, converting line endings to those of the underlying
system's, if different.
Returns TEXT, converting ` ` line endings to those of the underlying system's, if different.
(load-code code)
(load-code code uri)
(load-code code uri components)
(load-code-and-locs code)
(load-code-and-locs code uri)
(load-code-and-locs code uri components)
(load-code-and-zloc code)
(load-code-and-zloc code uri)
Load a code
block into the kondo db at the provided uri
and return a
zloc parsed from the code. Useful for refactorings that consult the kondo db.
Load a `code` block into the kondo db at the provided `uri` and return a zloc parsed from the code. Useful for refactorings that consult the kondo db.
(load-code-into-zloc-and-position code)
(load-code-into-zloc-and-position code uri)
Load a code
block into the kondo db at the provided uri
and return a map
containing the :zloc
parsed from the code and the :position
of the cursor.
Useful for refactorings that consult the kondo db.
Load a `code` block into the kondo db at the provided `uri` and return a map containing the `:zloc` parsed from the code and the `:position` of the cursor. Useful for refactorings that consult the kondo db.
(load-java-path uri)
(load-project project-root-uri source-paths)
(positions-from-text text)
Takes text with a pipe |
as a placeholder for cursor positions and returns the text without
the pipes alone with a vector of [row col] pairs representing the cursor positions (1-based)
Takes text with a pipe `|` as a placeholder for cursor positions and returns the text without the pipes alone with a vector of [row col] pairs representing the cursor positions (1-based)
(producer)
(put-cursor-at s row col end-col)
Position the cursor at the given row and column.
if end-col are different than col, understand as a selected range in editor.
positions are 1-based.
(position-cursor "[1 [2 [3]]]" 1 8 9) => "[1 [2 [|3|]]]"
Position the cursor at the given row and column. if end-col are different than col, understand as a selected range in editor. positions are 1-based. (position-cursor "[1 [2 [3]]]" 1 8 9) => "[1 [2 [|3|]]]"
(reset-components!)
(reset-components-before-test)
(string= string1 string2)
Like clojure.core/=
applied on STRING1 and STRING2, but treats
all line endings as equal.
Like `clojure.core/=` applied on STRING1 and STRING2, but treats all line endings as equal.
(submap? smaller larger)
(take-or-timeout c timeout-ms)
(with-strings results)
(zloc-from-code code)
Parse a zloc from a code
block. Useful for refactorings that do not consult
the kondo db.
Parse a zloc from a `code` block. Useful for refactorings that do not consult the kondo db.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close