Expand description
Syntax Highlighting Engine
Provides syntax highlighting for the text editor with support for Rust, C, and Shell languages. Uses a character-by-character state machine approach to tokenize lines into colored spans.
Structs§
- CHighlighter
- Syntax highlighter for C and C++ source code.
- Rust
Highlighter - Syntax highlighter for the Rust programming language.
- ShHighlighter
- Syntax highlighter for shell (Bash) scripts.
- Syntax
Theme - Color theme mapping each token type to a BGRA u32 color.
- Syntax
Token - A single highlighted span within a line.
Enums§
Traits§
- Syntax
Highlighter - Language-specific line tokenizer.
Functions§
- create_
highlighter - Create the appropriate highlighter for a language (returns
Nonefor languages without a highlighter implementation). - default_
theme - Return a dark-theme color palette similar to VS Code Dark+.
- detect_
language - Detect the source language from a filename extension.
- get_
token_ color - Map a
TokenTypeto its display color within a theme.