Skip to main content

Module style

Module style 

Source
Expand description

Syntax-highlight style types and the ExcerptHighlighter trait.

Moved from lattice-syntax so that lattice-runtime (which defines the Document trait) can reference ExcerptHighlighter without pulling in lattice-syntax — which has a transitive dep on lattice-mode → lattice-runtime (cycle). lattice-cells has no lattice deps, breaking the chain cleanly.

lattice-syntax re-exports everything from here so call-sites outside lattice-cells / lattice-runtime see no path change.

Structs§

ExcerptHighlight
Per-excerpt entry produced by [Document::excerpt_highlights].
RefineSpan
DR.2 (2026-08-12): a byte range whose background differs from its row’s — intra-line diff refinement.
StyledSpan
Byte-range span within one source line, carrying a semantic Style.

Enums§

RefineKind
Which side of a refined pair a RefineSpan belongs to. Picks the theme element, and nothing else.
Style
Semantic style category emitted by the tree-sitter highlighter.

Traits§

ExcerptHighlighter
Trait implemented by SyntaxHandle (and future highlight providers). Used by Document::excerpt_highlights so that lattice-runtime can expose per-excerpt highlighting through the Document trait without taking a direct dep on lattice-syntax.