Module miette::highlighters
source · Expand description
This module provides a trait for creating custom syntax highlighters that
highlight Diagnostic
source code with ANSI escape
sequences when rendering with the GraphicalReportHighlighter
.
It also provides built-in highlighter implementations that you can use out of the box.
By default, there are no syntax highlighters exported by miette
(except for the no-op BlankHighlighter
).
To enable support for specific highlighters, you should enable their associated feature flag.
Currently supported syntax highlighters and their feature flags:
syntect-highlighter
- Enablessyntect
syntax highlighting support via the [SyntectHighlighter
]
Structs§
- The default syntax highlighter. It applies
Style::default()
to input text. This is used by default when no syntax highlighting features are enabled. - The default highlighter state. It applies
Style::default()
to input text. This is used by default when no syntax highlighting features are enabled.
Traits§
- A syntax highlighter for highlighting miette
SourceCode
snippets. - A stateful highlighter that incrementally highlights lines of a particular source code.