Skip to main content

Crate escriba_ts

Crate escriba_ts 

Source
Expand description

escriba-ts — tree-sitter host for escriba.

The tree-sitter host now lives in hikari-ts (the fleet syntax spine’s tree-sitter backend, self-contained on crates.io). This crate re-exports it so escriba’s consumers keep a stable escriba_ts::… surface while the host itself has exactly one home — the dedup + load-bearing-fix that also breaks the old hikari-ts → escriba-ts dependency inversion (a fleet library must not depend on an application crate).

escriba_ts::Semantic is hikari_token::Semantic (the deduped fleet vocabulary), carrying the total From<Semantic> for hikari_core::HlClass.

Modules§

langs
Escriba-local language plugins — the languages the fleet spine does not ship yet. Moved here with build_ecosystem; a language table is language knowledge, not rendering. Escriba-local language plugins — the languages the fleet syntax spine does not ship yet.

Structs§

BufferParser
Per-buffer parser + last-parsed tree.
Ecosystem
The registry. Total resolution: an unmatched path resolves to PLAIN_TEXT, never a panic.
Grammar
A registered grammar — name, language, highlight config, claimed extensions.
GrammarRegistry
Registry — language-name → Grammar.
HighlightSpan
A colored text span — byte range + canonical Semantic bucket.
Language
A language identity — an interned static name (closed by linkage, no open enum to keep exhaustive).
TreeSitterHighlighter
The generic tree-sitter Highlighter. Whole-document highlight; the result (gappy Semantic spans) is funneled through SpanSink so the output is a coverage-complete hikari partition (gaps become Plain).
TreeSitterHost
The tree-sitter host — builds the built-in GrammarRegistry once and hands out per-language TreeSitterHighlighters + a LanguagePlugin per grammar for registration into a hikari Ecosystem.
TreeSitterPlugin
A hikari LanguagePlugin backed by a tree-sitter grammar.
TsEdit
A typed, byte-based description of one contiguous splice, for incremental tree-sitter reparse. tree-sitter’s native unit is the byte offset + a (row, byte-column) point, so this converts from a plain source splice — no tree-sitter type crosses the caller boundary.

Enums§

Semantic
The fleet semantic highlight class — the theme-facing vocabulary a renderer maps to color. Variant set + order are load-bearing: they are byte-identical to the historical escriba_ts::Semantic / caixa_theme::Semantic so serde / JsonSchema output does not drift when those crates re-export this one.
TsError

Functions§

build_ecosystem
The highlight registry escriba renders and reasons through.
highlight
Compute highlight spans over src using grammar.

Type Aliases§

Result