TreeIndentContext
class TreeIndentContext(state: EditorState, val pos: DocPos, simulateBreak: DocPos? = null, simulateDoubleBreak: Boolean = false) : IndentContext
Extended indent context with access to the syntax tree for tree-based indentation strategies.
Constructors
Link copied to clipboard
constructor(state: EditorState, pos: DocPos, simulateBreak: DocPos? = null, simulateDoubleBreak: Boolean = false)
Properties
Link copied to clipboard
The base indentation of the line the node starts on.
Link copied to clipboard
The base indentation from the node itself.
Link copied to clipboard
The current context node. Initially the innermost node at the indent position, but updated by indentFrom to the node bearing the indent strategy before the strategy function is called.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Skip to parent node's indent strategy. Use this when a node's strategy doesn't want to handle the current case and defers to an ancestor.
Link copied to clipboard
Get the indentation column at the start of the line at pos.
Link copied to clipboard
The text on the line at pos, starting from pos and capped at 100 characters. Honors simulateBreak/simulateDoubleBreak and bias. Matches CodeMirror's textAfterPos.