Documentation
¶
Overview ¶
Package highlight turns source text into ANSI-styled text using the Chroma lexers and styles, so that YAML, JSON, SQL and friends can be shown in a TextPane or any other widget that renders ANSI.
Index ¶
Constants ¶
View Source
const DefaultStyle = "dracula"
DefaultStyle is the Chroma style used by YAML and Language.
Variables ¶
This section is empty.
Functions ¶
func Colorize ¶
Colorize tokenises text with lexer and returns it with each token wrapped in the SGR sequences of the named Chroma style. A nil lexer selects Chroma's plain-text fallback. An unknown style falls back to Chroma's default style.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.