@codemirror/language
Advanced tools
Changelog
0.19.8 (2022-03-03)
Fix an issue that could cause indentation logic to use the wrong line content when indenting multiple lines at once.
Changelog
0.19.7 (2021-12-02)
Fix an issue where the parse worker could incorrectly stop working when the parse tree has skipped gaps in it.
Changelog
0.19.6 (2021-11-26)
Fixes an issue where the background parse work would be scheduled too aggressively, degrading responsiveness on a newly-created editor with a large document.
Improve initial highlight for mixed-language editors and limit the amount of parsing done on state creation for faster startup.
Changelog
0.19.5 (2021-11-17)
The new function syntaxTreeAvailable
can be used to check if a fully-parsed syntax tree is available up to a given document position.
The module now exports syntaxParserRunning
, which tells you whether the background parser is still planning to do more work for a given editor view.
Changelog
0.19.4 (2021-11-13)
LanguageDescription.of
now takes an optional already-loaded extension.
Changelog
0.19.3 (2021-09-13)
Fix an issue where a parse that skipped content with skipUntilInView
would in some cases not be restarted when the range came into view.
Changelog
0.19.2 (2021-08-11)
Fix a bug that caused indentOnInput
to fire for the wrong kinds of transactions.
Fix a bug that could cause indentOnInput
to apply its changes incorrectly.
Changelog
0.19.0 (2021-08-11)
CodeMirror now uses lezer 0.15, which means different package names (scoped with @lezer) and some breaking changes in the library.
EditorParseContext
is now called ParseContext
. It is no longer passed to parsers, but must be retrieved with ParseContext.get
.
IndentContext.lineIndent
now takes a position, not a Line
object, as argument.
LezerLanguage
was renamed to LRLanguage
(because all languages must emit Lezer-style trees, the name was misleading).
Language.parseString
no longer exists. You can just call .parser.parse(...)
instead.
New IndentContext.lineAt
method to access lines in a way that is aware of simulated line breaks.
IndentContext
now provides a simulatedBreak
property through which client code can query whether the context has a simulated line break.