zed/crates/syntax_theme/Cargo.toml
Nathan Sobo 121e2bbe84
Extract syntax_theme crate (#52798)
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
2026-03-31 08:06:37 -06:00

26 lines
530 B
TOML

[package]
name = "syntax_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"]
bundled-themes = ["dep:serde", "dep:serde_json"]
[lib]
path = "src/syntax_theme.rs"
doctest = false
[dependencies]
gpui.workspace = true
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }