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:

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.
  • Highlights miette [SourceCode] with the syntect highlighting crate.

Traits§