Expand description
Types and traits for implementing syntax highlighting.
Modules§
- themes
- Some common themes, pre-implemented for convenience.
Macros§
Structs§
- Highlight
Group Iter - Highlighted
Span - An individual fragment of highlighted text.
- Resolved
Style - Identical to a
Style
, except that all its fields are mandatory. - Rgb
- An RGB colour.
- Style
- The styling applied to a given
HighlightGroup
. - Styled
Grapheme - An individual styled grapheme.
Enums§
- Highlight
Group - The set of possible syntactical forms text can be assigned.
Traits§
- Highlight
- This trait is to be implemented by any type that syntax highlights source code for a particular
language. This is done by taking in a string slice and outputting a vector of
HighlightedSpan
s. - Theme
- A trait for defining syntax highlighting themes.
Functions§
- render
- A convenience function that renders a given input text using a given highlighter and theme,
returning a vector of
StyledGrapheme
s.