pub trait Highlighter: Send {
    fn highlight(&self, line: &str, cursor: usize) -> StyledText;
}
Expand description

The syntax highlighting trait. Implementers of this trait will take in the current string and then return a StyledText object, which represents the contents of the original line as styled strings

Required Methods

The action that will handle the current buffer as a line and return the corresponding StyledText for the buffer

Cursor position as byte offsets in the string

Implementors