Add importing-themes
feature flag to theme2
crate
When this feature is set the `themes` module won't be compiled. This allows us to run the `theme_importer` even when the `themes` module has compile errors in it.
This commit is contained in:
parent
60eae3e50a
commit
ff19a0ca18
4 changed files with 9 additions and 4 deletions
|
@ -6,6 +6,7 @@ publish = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["stories"]
|
default = ["stories"]
|
||||||
|
importing-themes = []
|
||||||
stories = ["dep:itertools"]
|
stories = ["dep:itertools"]
|
||||||
test-support = [
|
test-support = [
|
||||||
"gpui/test-support",
|
"gpui/test-support",
|
||||||
|
|
|
@ -83,7 +83,9 @@ impl Default for ThemeRegistry {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.insert_theme_families([zed_pro_family()]);
|
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
|
this
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@ mod registry;
|
||||||
mod scale;
|
mod scale;
|
||||||
mod settings;
|
mod settings;
|
||||||
mod syntax;
|
mod syntax;
|
||||||
// mod themes;
|
#[cfg(not(feature = "importing-themes"))]
|
||||||
|
mod themes;
|
||||||
mod user_theme;
|
mod user_theme;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -20,7 +21,8 @@ pub use registry::*;
|
||||||
pub use scale::*;
|
pub use scale::*;
|
||||||
pub use settings::*;
|
pub use settings::*;
|
||||||
pub use syntax::*;
|
pub use syntax::*;
|
||||||
// pub use themes::*;
|
#[cfg(not(feature = "importing-themes"))]
|
||||||
|
pub use themes::*;
|
||||||
pub use user_theme::*;
|
pub use user_theme::*;
|
||||||
|
|
||||||
use gpui::{AppContext, Hsla, SharedString};
|
use gpui::{AppContext, Hsla, SharedString};
|
||||||
|
|
|
@ -14,5 +14,5 @@ log.workspace = true
|
||||||
rust-embed.workspace = true
|
rust-embed.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
simplelog = "0.9"
|
simplelog = "0.9"
|
||||||
theme = { package = "theme2", path = "../theme2" }
|
theme = { package = "theme2", path = "../theme2", features = ["importing-themes"] }
|
||||||
uuid.workspace = true
|
uuid.workspace = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue