Liking cljdoc? Tell your friends :D

parinfer.paren-mode

Corrects indentation based on parens. See http://shaunlebron.github.io/parinfer/#paren-mode

Corrects indentation based on parens.
See http://shaunlebron.github.io/parinfer/#paren-mode
raw docstring

append-delim-trailclj/s

(append-delim-trail {:keys [stack line-no insert] :as state})

correct-indentclj/s

(correct-indent {:keys [indent-delta x-pos stack dedent-x line-no] :as state})

finalize-stateclj/s

(finalize-state {:keys [stack] :as state})

format-textclj/s

(format-text text)
(format-text text options)

Fully process the given text using Paren Mode.

'text' is the full text.

'options' is an optional map with supported keys: :cursor-x - x position of the cursor (zero-based) :cursor-line - line number of the cursor (zero-based)

Returns a map: :text - full text output :valid? - indicates if the input was valid :state - cached state to be passed to format-text-change (once it is implemented)

Fully process the given text using Paren Mode.

'text' is the full text.

'options' is an optional map with supported keys:
  :cursor-x     - x position of the cursor (zero-based)
  :cursor-line  - line number of the cursor (zero-based)

Returns a map:
  :text     - full text output
  :valid?   - indicates if the input was valid
  :state    - cached state to be passed to `format-text-change` (once it is implemented)
raw docstring

handle-cursor-deltaclj/s

(handle-cursor-delta
  {:keys [indent-delta line-no x-pos cursor-line cursor-x cursor-dx] :as state})

initial-stateclj/s

An initial state of our running state.

An initial state of our running state.
raw docstring

min-dedentclj/s

(min-dedent x {:keys [dedent-x]})

min-indentclj/s

(min-indent x {:keys [stack]})

process-charclj/s

(process-char {:keys [lines line-no] :as state} ch)

Update the state by processing the given character and its position.

Update the state by processing the given character and its position.
raw docstring

process-indentclj/s

(process-indent {:keys [stack track-indent? lines line-no ch x-pos cursor-line
                        cursor-x cursor-dx]
                 :as state})

Update the state by handling a possible indentation trigger.

Update the state by handling a possible indentation trigger.
raw docstring

process-lineclj/s

(process-line line)
(process-line {:keys [stack lines line-no cursor-line] :as state} line)

Update the state by processing the given line of text.

Update the state by processing the given line of text.
raw docstring

process-textclj/s

(process-text text)
(process-text text options)

Update the state by processing the given text.

Update the state by processing the given text.
raw docstring

reinsert-delimsclj/s

(reinsert-delims {:keys [removed-delims] :as state})

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

× close