pub struct SyntaxTheme {
pub highlight_names: Vec<String>,
pub highlight_colors: Vec<Color>,
pub default_color: Color,
}Expand description
Syntax specific syntax highlighting theme settings
Fields§
§highlight_names: Vec<String>Names of the Tree-sitter nodes. Syntax specific
highlight_colors: Vec<Color>indices into Base16 palette
default_color: ColorImplementations§
Source§impl SyntaxTheme
impl SyntaxTheme
pub fn from_base16_and_spec(base: Base16, spec: HighlightSpec) -> Self
pub fn color_for_name(&self, name: &str) -> Option<Color>
Trait Implementations§
Source§impl Clone for SyntaxTheme
impl Clone for SyntaxTheme
Source§fn clone(&self) -> SyntaxTheme
fn clone(&self) -> SyntaxTheme
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SyntaxTheme
impl Debug for SyntaxTheme
Source§impl<'de> Deserialize<'de> for SyntaxTheme
impl<'de> Deserialize<'de> for SyntaxTheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SyntaxTheme
impl RefUnwindSafe for SyntaxTheme
impl Send for SyntaxTheme
impl Sync for SyntaxTheme
impl Unpin for SyntaxTheme
impl UnsafeUnpin for SyntaxTheme
impl UnwindSafe for SyntaxTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more