Functions§
- available_
themes - Get all available theme names
- default_
theme_ name - Get the default syntax theme name
- find_
syntax_ by_ extension - Find syntax by file extension
- find_
syntax_ by_ name - Find syntax by exact name
- find_
syntax_ by_ token - Find syntax by language token (e.g., “rust”, “python”)
- find_
syntax_ plain_ text - Get plain text syntax fallback
- get_
active_ syntax_ theme - Get the recommended syntax theme for the current core UI theme.
- get_
syntax_ theme - Get the recommended syntax theme for a specific UI theme.
- highlight_
code_ to_ ansi - Convert code to ANSI escape sequences
- highlight_
code_ to_ anstyle_ line_ segments - Highlight code and convert to
anstylesegments with optional bg stripping. - highlight_
code_ to_ line_ segments - Highlight code and return styled segments per line.
- highlight_
code_ to_ segments - Highlight code and return styled segments
- highlight_
line_ for_ diff - Highlight a single line (for diff rendering)
- highlight_
line_ to_ anstyle_ segments - Highlight one line and convert to
anstylesegments with optional bg stripping. - load_
theme - Load a theme from the process-global theme set.
- should_
highlight - Check if input should be highlighted (guardrails)
- syntax_
set - Get the global SyntaxSet reference