pub struct SyntaxTheme {Show 19 fields
pub keyword: Hsla,
pub function: Hsla,
pub type_name: Hsla,
pub string: Hsla,
pub number: Hsla,
pub comment: Hsla,
pub operator: Hsla,
pub punctuation: Hsla,
pub heading1: Hsla,
pub heading2: Hsla,
pub heading3: Hsla,
pub bold: Hsla,
pub italic: Hsla,
pub code: Hsla,
pub code_bg: Hsla,
pub link: Hsla,
pub custom: HashMap<&'static str, Hsla>,
pub error: Hsla,
pub warning: Hsla,
}Expand description
Color configuration for syntax elements.
Fields§
§keyword: HslaColor for language keywords.
function: HslaColor for function and method names.
type_name: HslaColor for type and struct names.
string: HslaColor for string literals.
number: HslaColor for numeric literals.
comment: HslaColor for comments.
operator: HslaColor for mathematical and logical operators.
punctuation: HslaColor for punctuation and delimiter characters.
heading1: HslaColor for top-level headers (# Header).
heading2: HslaColor for second-level headers (## Header).
heading3: HslaColor for third-level headers (### Header).
bold: HslaColor for bold text.
italic: HslaColor for italic text.
code: HslaColor for inline code spans.
code_bg: HslaBackground pill fill color for inline code spans.
link: HslaColor for hyperlink text.
custom: HashMap<&'static str, Hsla>Registered colors for HighlightTag::Custom names. Unregistered names
fall back to the editor foreground.
error: HslaColor for diagnostic error underlines and squiggles.
warning: HslaColor for diagnostic warning underlines and squiggles.
Implementations§
Source§impl SyntaxTheme
impl SyntaxTheme
Sourcepub fn set_custom_tag_color(&mut self, name: &'static str, color: Hsla)
pub fn set_custom_tag_color(&mut self, name: &'static str, color: Hsla)
Registers a color for a HighlightTag::Custom name (e.g. "speaker").
Trait Implementations§
Source§impl Clone for SyntaxTheme
impl Clone for SyntaxTheme
Source§fn clone(&self) -> SyntaxTheme
fn clone(&self) -> SyntaxTheme
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyntaxTheme
impl Debug for SyntaxTheme
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().