Documentation ¶
Overview ¶
Package highlight provides an Elvish syntax highlighter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxBlockForLate = 10 * time.Millisecond
MaxBlockForLate specifies the maximum wait time to block for late results. It can be changed for test cases.
Functions ¶
This section is empty.
Types ¶
type Highlighter ¶
type Highlighter struct {
// contains filtered or unexported fields
}
Highlighter is a code highlighter that can deliver results asynchronously.
func NewHighlighter ¶
func NewHighlighter(cfg Config) *Highlighter
func (*Highlighter) Get ¶
func (hl *Highlighter) Get(code string) (ui.Text, []error)
Get returns the highlighted code and static errors found in the code.
func (*Highlighter) LateUpdates ¶
func (hl *Highlighter) LateUpdates() <-chan struct{}
LateUpdates returns a channel for notifying late updates.
Click to show internal directories.
Click to hide internal directories.