Liking cljdoc? Tell your friends :D

clojure-lsp.feature.drag

Drag clauses forward or backward.

{:a 1, :b 2} -> {:b 2, :a 1}

Though this feature was originally called 'move collection entry', it is now more generally used to drag any clause forward or backward, even if it isn't in an immutable collection.

Drag clauses forward or backward.

{:a 1, :b 2} -> {:b 2, :a 1}

Though this feature was originally called 'move collection entry', it is now
more generally used to drag any clause forward or backward, even if it isn't
in an immutable collection.
raw docstring

can-drag-backward?clj

(can-drag-backward? zloc uri db)
source

can-drag-forward?clj

(can-drag-forward? zloc uri db)
source

drag-backwardclj

(drag-backward zloc cursor-position uri db)
source

drag-clauseclj

(drag-clause clause-data dir cursor-position uri)

Drag the origin-clause in direction of dir, adjusting the cursor-position to move with the clause.

Instructs the client to:

  • Apply edits that swap the clauses.
  • Re-position the cursor after the edits.
Drag the `origin-clause` in direction of `dir`, adjusting the
`cursor-position` to move with the clause.

Instructs the client to:
- Apply edits that swap the clauses.
- Re-position the cursor after the edits.
sourceraw docstring

drag-forwardclj

(drag-forward zloc cursor-position uri db)
source

identify-clausesclj

(identify-clauses clause-spec)

Like f.clauses/identify, but adds origin-clause, after ensuring cursor was in a clause.

Like f.clauses/identify, but adds origin-clause, after ensuring cursor was in
a clause.
sourceraw docstring

node-editsclj

(node-edits {:keys [nodes-before earlier-clause-nodes later-clause-nodes
                    nodes-after]})
source

nodes-to-dragclj

(nodes-to-drag {:keys [rind-before rind-after clauses+padding clause-count
                       origin-clause]}
               dir)

Identifies the nodes that will participate in dragging the origin-clause in direction of dir.

Identifies the nodes that will participate in dragging the `origin-clause` in
direction of `dir`.
sourceraw docstring

planclj

(plan zloc dir uri db)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close