styles

package
v3.0.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: MIT, OFL-1.1 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fallback = registry["swapoff"]

Fallback style. Reassign to change the default fallback style.

Functions

func Get

func Get(name string) *chroma.Style

Get named style, or Fallback.

func GetForMode

func GetForMode(name string, mode chroma.Mode) *chroma.Style

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

func Lookup(name string) (*chroma.Style, bool)

Lookup a named style, returning false if not found.

func Names

func Names() []string

Names of all available styles.

func Register

func Register(style *chroma.Style) *chroma.Style

Register a chroma.Style.

func RegisterPair

func RegisterPair(a, b *chroma.Style)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL