theme

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: MPL-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LanguageConstruct

type LanguageConstruct int

LanguageConstruct represents a type of construct in a language. It is intended to be mapped to a Style so that plugins can retrieve styles for constructs in the language they are trying to highlight.

const (
	Keyword LanguageConstruct = 1 + iota
	Builtin
	Func
	Type
	Ident

	String
	Num
	Nil

	Comment

	Bad

	// ScopePair is a much higher value to provide extra space
	// for other language constructs (e.g. for languages that
	// have constructs that Go doesn't).  Because ScopePairs are
	// often intentionally highlighted with rainbow so that each
	// pair of opening/closing marks are a different color,
	// ScopePair can be used as an initial value, with the value
	// being incremented for each nested pair.
	//
	// For example, the opening/closing marks for functions may
	// be ScopePair, while opening/closing marks for if statements
	// inside of functions may be ScopePair+1
	ScopePair LanguageConstruct = 100

	// None is a special symbol, telling vidar that a part of the code isn't
	// really a symbol in the language, at least for syntax highlighting
	// purposes.
	None LanguageConstruct = 0
)

type Style

type Style struct {
	Style      font.Style
	Weight     font.Weight
	Foreground color.Color
	Background color.Color
}

Style is a set of font information for a theme.

Jump to

Keyboard shortcuts

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