Skip to main content

Crate termesh_syntax

Crate termesh_syntax 

Source
Expand description

Tree-sitter highlighting (ARCHITECTURE.md Appendix A).

Produces plain (start, end, SyntaxKind) spans in char offsets, which the editor turns into decorations. Nothing tree-sitter crosses this boundary, so adding a language is a table entry here and touches nothing above.

Reparses whole. ARCHITECTURE.md §8 wants incremental parsing fed by the change stream, and the transaction spine already carries everything needed to do it — the missing piece is keeping the Tree and calling Tree::edit with each change. A full reparse of an ordinary source file is well under a millisecond and happens on edit rather than on render, so this is a real but bounded shortcut, and the seam for fixing it is Highlighter::highlight.

Structs§

Highlighter
Parses and highlights one language.

Enums§

Language
A language we can highlight.

Type Aliases§

Span
A highlighted span, in char offsets.