Trait TheCodeHighlighterTrait
Source pub trait TheCodeHighlighterTrait: Send {
Show 16 methods
// Required methods
fn syntax(&self) -> &str;
fn syntect_syntax(&self) -> &SyntaxReference;
fn syntect_theme(&self) -> &Theme;
fn set_syntax_by_name(&mut self, name: &str);
fn set_theme(&mut self, theme: &str);
fn add_syntax_from_string(&mut self, syntax_str: &str) -> Result<(), String>;
fn add_theme_from_string(&mut self, theme_str: &str) -> Result<(), String>;
fn background(&self) -> Option<TheColor>;
fn caret(&self) -> Option<TheColor>;
fn guide(&self) -> Option<TheColor>;
fn active_guide(&self) -> Option<TheColor>;
fn selection_background(&self) -> Option<TheColor>;
fn match_background(&self) -> Option<TheColor>;
fn active_match_background(&self) -> Option<TheColor>;
fn misspelling(&self) -> Option<TheColor>;
fn highlight_line(
&self,
line: &str,
h: &mut HighlightLines<'_>,
) -> Vec<(TheColor, TheColor, usize)>;
}