mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
Extract `SyntaxTheme` into its own lightweight crate so that downstream consumers can use syntax highlighting colors without pulling in the full `theme` crate and its transitive dependencies. ## Changes **Commit 1 — Extract SyntaxTheme into its own crate** Move `SyntaxTheme`, `SyntaxThemeSettings`, `HighlightStyle`, and supporting types from `theme/src/styles/syntax.rs` into a new `syntax_theme` crate that depends only on `gpui`. The `theme` crate re-exports everything for backward compatibility — no call-site changes needed. **Commit 2 — Add `bundled-themes` feature with One Dark** Add an optional `bundled-themes` feature that bundles `one_dark()`, a `SyntaxTheme` loaded from the existing One Dark JSON theme file. This lets consumers get a usable syntax theme without depending on the full theme machinery. Release Notes: - N/A
37 lines
862 B
TOML
37 lines
862 B
TOML
[package]
|
|
name = "theme"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = []
|
|
test-support = ["gpui/test-support", "syntax_theme/test-support"]
|
|
|
|
[lib]
|
|
path = "src/theme.rs"
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
collections.workspace = true
|
|
derive_more.workspace = true
|
|
gpui.workspace = true
|
|
syntax_theme.workspace = true
|
|
palette = { workspace = true, default-features = false, features = ["std"] }
|
|
parking_lot.workspace = true
|
|
refineable.workspace = true
|
|
schemars = { workspace = true, features = ["indexmap2"] }
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
serde_json_lenient.workspace = true
|
|
strum.workspace = true
|
|
thiserror.workspace = true
|
|
uuid.workspace = true
|
|
|
|
[dev-dependencies]
|
|
gpui = { workspace = true, features = ["test-support"] }
|