Skip to main content

Crate clankerdiff_syntax

Crate clankerdiff_syntax 

Source
Expand description

Portable syntax highlighting APIs.

Structs§

CacheConfig
Fixed resource limits for a SyntaxHighlighter.
CacheKey
Opaque syntax-cache key with a stable diagnostic fingerprint.
DiffPalette
Colors used by diff renderers.
DiffTheme
A capture-based syntax theme plus semantic colors for the diff UI.
DocumentHighlights
Highlight spans projected onto every source line of one parsed document.
FontStyle
Text modifiers returned by the syntax engine.
HighlightSpan
A highlighted, UTF-8-safe byte range into the supplied source.
HighlightStats
Counters useful for measuring highlighting and cache behavior.
Rgba
An sRGB color with an explicit alpha channel.
SourceSequenceId
Snapshot-local identity for one ordered sequence of source lines.
SyntaxHighlighter
A reusable syntax highlighter. Entries are evicted oldest-first when full.
SyntaxStream
SyntaxStreamUpdate
SyntaxStyle
Style assigned to a Tree-sitter capture name.
ThemedHighlighter
Theme-bound highlighting operations.

Enums§

LanguageHint
A structured language hint accepted by the highlighter.
SyntaxStreamError

Functions§

empty_spans
A shared empty span set, for text with nothing to highlight.
resolve_language
Resolves a language ID, alias, or repository path to a bundled Arborium grammar.

Type Aliases§

SyntaxTheme
A syntax-only theme view. This alias keeps the capture API compact while allowing callers to depend on the syntax boundary rather than the diff UI.