mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
WIP
This commit is contained in:
parent
004c5d309b
commit
809d8786f1
1 changed files with 32 additions and 0 deletions
|
@ -9,6 +9,38 @@ struct ImportedThemeFamily {
|
|||
pub themes: Vec<ImportedThemeVariant>,
|
||||
}
|
||||
|
||||
struct ImportedThemeVariant {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub colors: ThemeColorsRefinement,
|
||||
}
|
||||
|
||||
macro_rules! gen_vscode_colors_and_enum {
|
||||
($($name:ident: $type:ty),*) => {
|
||||
#[derive(Debug)]
|
||||
pub struct VSCodeColors {
|
||||
$(
|
||||
pub $name: $type,
|
||||
)*
|
||||
}
|
||||
|
||||
pub enum VSCodeColor {
|
||||
$(
|
||||
$({
|
||||
let mut s = stringify!($name).to_string();
|
||||
s.get_mut(0..1).unwrap().make_ascii_uppercase();
|
||||
s.replace("_", "")
|
||||
}),
|
||||
)*
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
gen_vscode_colors_and_enum! {
|
||||
terminal_background: String,
|
||||
terminal_foreground: String
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct VSCodeColors {
|
||||
terminal_background: String,
|
||||
|
|
Loading…
Reference in a new issue