Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Color ¶
type Color struct {
// contains filtered or unexported fields
}
Color specifies a foreground and background color.
type LineColor ¶
type LineColor struct {
Fg, Bg termbox.Attribute
Start, End int
}
LineColor object maps a color pair (bg, fg) with start/end indices within a string.
type SyntaxRule ¶
type SyntaxRule struct {
// contains filtered or unexported fields
}
SyntaxRule simply maps a regexp to a color.
type SyntaxRules ¶
type SyntaxRules struct {
// contains filtered or unexported fields
}
SyntaxRules is the full collection of all syntax rules.
func NewSyntaxRules ¶
func NewSyntaxRules(cfg config.Config) *SyntaxRules
NewSyntaxRules creates a new SyntaxRules object, and initializes the syntax rule sets.
func (SyntaxRules) Colorize ¶
func (rules SyntaxRules) Colorize(str string) []LineColor
Colorize takes in a string and outputs an array of LineColor objects.
Click to show internal directories.
Click to hide internal directories.