Repository navigation
v0.13.0
·
18 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changes
- A slow synchronous tree-sitter edit no longer keeps the editor on the main thread. An edit that
takes longer thanTreeSitterClient.Constants.maxSyncEditDuration(30ms) sends later edits to
the asynchronous path, and an edit that comes back under it brings synchronous editing back. Every
edit re-runs the language's query over the whole tree to look for injections, so its cost grows
with the document (about 1.1µs per character in a release build), and the length checks alone
couldn't keep that off the main thread. Multiple cursors multiply it, since each one reparses. - Documents over
TreeSitterClient.Constants.maxHighlightableContentLength(250,000 characters,
about 280ms per edit) are no longer highlighted. The client stops parsing and returns no
highlights, and starts again over the whole document when it shrinks back under the limit or a
new language is set. Text that was already highlighted when the document crossed the limit keeps
its colours.