Package-level declarations
Types
Configuration for bracket matching.
Comment tokens for a language, used by comment toggle commands.
Builder scope for defining a HighlightStyle via DSL.
Marks DSL scope for HighlightStyleBuilder.
Context object passed to indent services and node prop strategies.
Metadata descriptor for a language. Used for language detection and dynamic language loading.
Bundles a Language with optional supporting extensions.
Subclass of Language for LR-parser-based languages.
Result of a bracket-matching query.
A Language class based on a CodeMirror 5-style StreamParser.
A stream parser parses or tokenizes content from start to end, emitting tokens as it goes. It keeps a mutable (but copyable) object with state.
Encapsulates a single line of input. Given to stream syntax code, which uses it to tokenize the content.
Specification for a tag-to-style mapping in HighlightStyle.define.
Extended indent context with access to the syntax tree for tree-based indentation strategies.
Properties
A NodeProp that language parsers can attach to node types to provide custom bracket-matching behavior. The function receives the syntax node and the document state, and returns a MatchResult if this node represents a bracket, or null otherwise.
Facet that provides comment token information for comment commands. Languages should register their comment tokens via this facet.
A default highlight style (works well with light themes).
Standard indent strategy: don't indent (return 0 columns).
Fold all foldable ranges in the document.
Fold the code at the current cursor line.
Effect to fold a range.
Default fold key bindings.
A node prop that attaches fold information to node types.
Facet for registering fold range providers.
State field that tracks the set of currently folded ranges. Folded ranges are represented as ReplaceDecorations.
A node prop that attaches indentation strategies to node types in the syntax tree.
Extension that automatically re-indents the current line when the user types a character that triggers indentation changes (e.g. a closing brace).
Facet used to register indent services. An indent service is a function that, given an IndentContext and a position, returns the desired indentation (in columns), or null if it has no opinion.
Facet for configuring the indent unit (number of spaces per indent level). Defaults to 2.
A NodeProp that can be attached to the top node of a language's syntax tree to associate language metadata with that node type.
One Dark inspired highlight style.
Toggle fold at the current cursor line.
Unfold all folded ranges.
Unfold the code at the current cursor position.
Effect to unfold a range.
Functions
Extension that highlights matching brackets near the cursor.
Core code folding extension that wires the fold state.
Standard indent strategy: continue the indentation of the previous line, optionally with additional units.
Standard indent strategy: indent one level inside delimiters.
Get the syntax tree for the state if it covers at least up to position upto. In Kodemirror's synchronous parsing model, the tree always covers the full document, so this always returns the tree when one is available.
Find a foldable range at the given line position, using registered fold services and tree-based fold props.
Query the currently folded ranges in a state.
Extension that adds a gutter column with fold indicators.
Helper that creates a fold range covering the inside of a node (excluding the first and last characters, typically brackets).
Force a complete re-parse of the document. In Kodemirror's synchronous parsing model, the tree is always current, so this returns the existing tree.
Query the indentation for a position using registered indent services and tree-based indentation strategies.
Get the indent unit (number of spaces per level) for the given state.
Generate a ChangeSpec.Multi that re-indents every line in the given range.
Generate an indentation string for the given number of columns, using tabs if the state's indentUnit divides evenly, otherwise spaces.
Query language-specific data at a given position by walking up the syntax tree and looking for nodes with languageDataProp attached.
Match brackets at a given position in the document.
Wrap a highlighter in an editor extension that uses it to apply syntax highlighting to the editor content.
Check whether the syntax parser is currently running in the background. In Kodemirror's synchronous parsing model, parsing completes immediately on every state update, so this always returns false.
Get the syntax tree for a state, which is the current parse tree of the active language, or Tree.empty if no language is configured.
Check whether a complete syntax tree is available up to the given position. In Kodemirror's synchronous parsing model, the tree always covers the full document, so this returns true whenever a language is configured.