Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

WIP

Nate Butler809d8786f129
diff --git a/crates/theme2/src/import.rs b/crates/theme2/src/import.rs
index 147babf0079..26850b5b78f 100644
--- a/crates/theme2/src/import.rs
+++ b/crates/theme2/src/import.rs
@@ -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,