Skip to main content

Module syntax

Module syntax 

Source
Expand description

Headless syntax highlighting, styling tokens, and interval splitting.

Structs§

ConcealedLine
A rendered visual line where concealed syntax tokens have been collapsed, maintaining exact bidirectional mapping to source buffer byte offsets.
DisplayPad
Display-only padding spliced into a ConcealedLine’s display text.
Rgba
An 8-bit per channel RGBA color representation.
StyleSpan
A styled region of text on a single line.
StyledSegment
A contiguous segment of text on a line with its resolved style and selection status.
TextStyle
Direct styling attributes for a span of text.

Enums§

HighlightTag
Semantic categorization for syntax tokens.
StyleValue
The style applied to a token, either via a semantic tag or direct visual attributes.
UnderlineDecoration
Visual style for underlined text.

Traits§

SyntaxHighlighter
Trait implemented by language tokenizers and syntax highlighters.

Functions§

display_width
Display-column width of s for monospace alignment.
split_line_intervals
Computes disjoint, sorted styled segments for a line by splitting across syntax span and selection boundaries.