Debian Codegraph @

src/options/config/style/themes.rs

raw symbols SCIP
1 //! A set of pre-defined themes.
2
3 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/themes/) mod defaultrust-analyzer cargo bottom 0.14.9 options/config/style/themes/default/;
4 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/themes/) mod gruvboxrust-analyzer cargo bottom 0.14.9 options/config/style/themes/gruvbox/;
5 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/themes/) mod nordrust-analyzer cargo bottom 0.14.9 options/config/style/themes/nord/;
6
7 /// Convert a [`ratatui::style::Color`] into a [`ratatui::style::Style`] with the colour
8 /// as the foreground.
9 macro_rules! colourrust-analyzer cargo bottom 0.14.9 options/config/style/themes/colour! {
10 ($value:expr) => {
11 ratatui::style::Style::new().fg($value)
12 };
13 }
14
15 /// Convert a hex string to a [`ratatui::style::Style`], where the hex string is
16 /// used as the foreground colour.
17 macro_rules! hexrust-analyzer cargo bottom 0.14.9 options/config/style/themes/hex! {
18 ($value:literal) => {
19 ratatui::style::Style::new().fg(crate::options::config::style::utils::try_hex_to_colour(
20 $value.into(),
21 )
22 .expect("valid hex"))
23 };
24 }
25
26 /// Convert a hex string to a [`ratatui::style::Color`].
27 macro_rules! hex_colourrust-analyzer cargo bottom 0.14.9 options/config/style/themes/hex_colour! {
28 ($value:literal) => {
29 crate::options::config::style::utils::try_hex_to_colour($value.into()).expect("valid hex")
30 };
31 }
32
33 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/) use colourrust-analyzer cargo bottom 0.14.9 options/config/style/themes/colour!;
34 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/) use hexrust-analyzer cargo bottom 0.14.9 options/config/style/themes/hex!;
35 pub(superrust-analyzer cargo bottom 0.14.9 options/config/style/) use hex_colourrust-analyzer cargo bottom 0.14.9 options/config/style/themes/hex_colour!;