ui/widgets/syntax_highlight library

Classes

HighlightSpan
A highlighted text span.
SyntaxColors
Syntax highlight color theme.
SyntaxHighlightView
Widget that renders syntax-highlighted code.

Enums

HighlightTokenType
Token types for syntax coloring.

Functions

detectLanguage(String hint) → String
Language detection from file extension or code fence.
detectLanguageFromPath(String path) → String
Detect language from file path.
tokenize(String code, String language) → List<HighlightSpan>
Tokenize source code into highlighted spans. Uses a rule-based approach — not a full parser, but good enough for display purposes.