pub struct ColorScheme {
pub bg: Color,
pub fg: Color,
pub bar_bg: Color,
pub signcol_fg: Color,
pub minibuffer_hl: Color,
pub syntax: HashMap<String, Styles>,
}
Expand description
A colorscheme for rendering the UI.
UI elements are available as properties and syntax stylings are available as a map of string tag to [Style]s that should be applied.
Fields§
§bg: Color
§fg: Color
§bar_bg: Color
§signcol_fg: Color
§minibuffer_hl: Color
§syntax: HashMap<String, Styles>
Implementations§
Source§impl ColorScheme
impl ColorScheme
Sourcepub fn styles_for(&self, tag: &str) -> &Styles
pub fn styles_for(&self, tag: &str) -> &Styles
Determine UI Styles to be applied for a given syntax tag.
If the full tag does not have associated styling but its dotted prefix does then the styling of the prefix is used, otherwise default styling will be used (TK_DEFAULT).
For key “foo.bar.baz” this will return the first value found out of the following keyset:
- “foo.bar.baz”
- “foo.bar”
- “foo”
- TK_DEFAULT
Trait Implementations§
Source§impl Clone for ColorScheme
impl Clone for ColorScheme
Source§fn clone(&self) -> ColorScheme
fn clone(&self) -> ColorScheme
Returns a duplicate of the value. Read more
1.0.0 · 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 ColorScheme
impl Debug for ColorScheme
Source§impl Default for ColorScheme
impl Default for ColorScheme
Source§impl<'de> Deserialize<'de> for ColorScheme
impl<'de> Deserialize<'de> for ColorScheme
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
Source§impl PartialEq for ColorScheme
impl PartialEq for ColorScheme
impl Eq for ColorScheme
impl StructuralPartialEq for ColorScheme
Auto Trait Implementations§
impl Freeze for ColorScheme
impl RefUnwindSafe for ColorScheme
impl Send for ColorScheme
impl Sync for ColorScheme
impl Unpin for ColorScheme
impl UnwindSafe for ColorScheme
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.