Expand description
Syntax highlighting via syntect (100+ languages, Sublime Text theme support).
Syntax highlighting — equivalent to Rich’s syntax.py.
Uses syntect for syntax highlighting (Rust equivalent of Pygments).
Structs§
- ANSI
Syntax Theme - A syntax theme that maps to ANSI colors (lightweight, no Pygments dependency).
- Syntax
- A syntax-highlighted source code renderable.
Traits§
- Syntax
Theme - Trait for syntax themes.
Functions§
- get_
lexer_ by_ name - Resolve a lexer name (case-insensitive) to a canonical name.
- get_
style_ by_ name - Get a pre-built
ANSISyntaxThemeby name. - guess_
lexer_ for_ filename - Guess the syntax lexer name from a filename or file path.