Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Fallback = func() *chroma.Style { fallback, ok := Lookup("swapoff") if !ok { panic(`chroma/styles: default fallback style "swapoff" is missing`) } return fallback }()
Fallback style. Reassign to change the default fallback style.
Functions ¶
func All ¶
All returns every available style, sorted case-insensitively by name.
The first call parses every embedded style not yet looked up.
func GetForMode ¶
GetForMode returns the named style if it already matches mode, otherwise its registered counterpart if one exists and matches mode. If neither matches, the originally-requested style is returned (or Fallback if the name is unknown), so callers always get something usable.
func Lookup ¶
Lookup a named style, returning false if not found. Embedded styles are parsed on first lookup.
func RegisterPair ¶
RegisterPair links two styles as light/dark counterparts of each other.
Both styles are also registered if they are not already present.
Types ¶
This section is empty.