Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add `importing-themes` feature flag to `theme2` crate
Marshall Bowersff19a0ca1816
diff --git a/crates/theme2/Cargo.toml b/crates/theme2/Cargo.tomlindex 45ba4587bab..22bea20e164 100644--- a/crates/theme2/Cargo.toml+++ b/crates/theme2/Cargo.toml@@ -6,6 +6,7 @@ publish = false[features]default = ["stories"]+importing-themes = []stories = ["dep:itertools"]test-support = ["gpui/test-support",diff --git a/crates/theme2/src/registry.rs b/crates/theme2/src/registry.rsindex d95283fc122..49546973c8a 100644--- a/crates/theme2/src/registry.rs+++ b/crates/theme2/src/registry.rs@@ -83,7 +83,9 @@ impl Default for ThemeRegistry {};this.insert_theme_families([zed_pro_family()]);- // this.insert_user_theme_familes(crate::all_user_themes());++ #[cfg(not(feature = "importing-themes"))]+ this.insert_user_theme_familes(crate::all_user_themes());this}diff --git a/crates/theme2/src/theme2.rs b/crates/theme2/src/theme2.rsindex 16e0db09fae..7e2085de4e7 100644--- a/crates/theme2/src/theme2.rs+++ b/crates/theme2/src/theme2.rs@@ -6,7 +6,8 @@ mod registry;mod scale;mod settings;mod syntax;-// mod themes;+#[cfg(not(feature = "importing-themes"))]+mod themes;mod user_theme;use std::sync::Arc;@@ -20,7 +21,8 @@ pub use registry::*;pub use scale::*;pub use settings::*;pub use syntax::*;-// pub use themes::*;+#[cfg(not(feature = "importing-themes"))]+pub use themes::*;pub use user_theme::*;use gpui::{AppContext, Hsla, SharedString};diff --git a/crates/theme_importer/Cargo.toml b/crates/theme_importer/Cargo.tomlindex 1c86349e968..1109a60977a 100644--- a/crates/theme_importer/Cargo.toml+++ b/crates/theme_importer/Cargo.toml@@ -14,5 +14,5 @@ log.workspace = truerust-embed.workspace = trueserde.workspace = truesimplelog = "0.9"-theme = { package = "theme2", path = "../theme2" }+theme = { package = "theme2", path = "../theme2", features = ["importing-themes"] }uuid.workspace = true