Expand description
Portable syntax highlighting APIs.
Structs§
- Cache
Config - Fixed resource limits for a
SyntaxHighlighter. - Cache
Key - Opaque syntax-cache key with a stable diagnostic fingerprint.
- Cache
Usage - Document
Highlights - Highlight spans projected onto every source line of one parsed document.
- Font
Style - Text modifiers returned by the syntax engine.
- Highlight
Span - A highlighted, UTF-8-safe byte range into the supplied source.
- Highlight
Stats - Counters useful for measuring highlighting and cache behavior.
- Rgba
- An sRGB color with an explicit alpha channel.
- Source
Sequence Id - Snapshot-local identity for one ordered sequence of source lines.
- Syntax
Highlighter - A reusable syntax highlighter. Least-recently-used entries are evicted when full.
- Syntax
Stream - Syntax
Stream Update - Syntax
Style - Style assigned to a Tree-sitter capture name.
- Syntax
Theme - Themed
Highlighter - Theme-bound highlighting operations.
Enums§
- Language
Hint - A structured language hint accepted by the highlighter.
- Syntax
Stream Error
Functions§
- empty_
spans - A shared empty span set, for text with nothing to highlight.
- resolve_
language - Resolves a language ID, alias, or repository path.