Skip to main content

SyntaxTheme

Trait SyntaxTheme 

Source
pub trait SyntaxTheme: Send + Sync {
    // Required methods
    fn get_style(&self, style: &SyntectStyle) -> Style;
    fn get_background_style(&self) -> Style;
    fn syntect_theme(&self) -> Option<&Theme>;
}
Expand description

Trait for syntax themes.

Abstracts the theme system to support both syntect themes and ANSI themes.

Required Methods§

Source

fn get_style(&self, style: &SyntectStyle) -> Style

Get the style for a token (foreground, background).

Source

fn get_background_style(&self) -> Style

Get the background style for the theme.

Source

fn syntect_theme(&self) -> Option<&Theme>

Get the underlying syntect Theme, if available.

Implementors§