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
(append-delim-trail {:keys [stack line-no insert] :as state})
(correct-indent {:keys [indent-delta x-pos stack dedent-x line-no] :as state})
(finalize-state {:keys [stack] :as state})
(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)
(handle-cursor-delta
{:keys [indent-delta line-no x-pos cursor-line cursor-x cursor-dx] :as state})
An initial state of our running state.
An initial state of our running state.
(min-dedent x {:keys [dedent-x]})
(min-indent x {:keys [stack]})
(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.
(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.
(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.
(process-text text)
(process-text text options)
Update the state by processing the given text.
Update the state by processing the given text.
(reinsert-delims {:keys [removed-delims] :as state})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close