Expand description
Tree-sitter foundation shared by highlighting, scope context, and the
structural diff. Grammars are statically linked (no runtime loading, since
musl-static binaries cannot dlopen); a parse failure or unknown language
degrades silently to plain behavior so the UI is never blocked.
Re-exports§
pub use registry::HIGHLIGHT_NAMES;pub use registry::LangEntry;pub use registry::LanguageRegistry;pub use scope::ScopeIndex;pub use symbols::Ident;
Modules§
- intraline
- Char-precise intra-line change emphasis driven by an AST diff (syndiff),
the structural counterpart to the textual engine in
crate::pairing. Only the byte ranges that differ structurally are emphasized, so a reformatted or re-wrapped block highlights just the tokens that changed. - registry
- Language registry: maps a file path to its tree-sitter grammar, a configured highlight configuration, and (where the grammar ships one) a tags query used for scope/definition lookup. Built once and reused.
- scope
- “What are we inside of”: the chain of enclosing definitions (function, class, method, …) for a line, derived from a grammar’s tags query. The result is plain data so the diff worker can compute it once and share it.
- symbols
- The names a file uses, as its parse tree sees them: every identifier by line and byte range, so a reader can follow one name through a change.