zed/crates/theme/Cargo.toml
Marshall Bowers f5f7be1500
Add experimental.theme_overrides to settings file (#6791)
This PR adds **experimental** support for overriding theme values in the
current theme.

Be advised that both the existence of this setting and the structure of
the theme itself are subject to change.

But this is a first step towards allowing Zed users to customize or
bring their own themes.

### How it works

There is a new `experimental.theme_overrides` setting in
`settings.json`.

This accepts an object containing overrides for values in the theme. All
values are optional, and will be overlaid on top of whatever theme you
currently have set by the `theme` field.

There is JSON schema support to show which values are supported.

### Example

Here's an example of it in action:


https://github.com/zed-industries/zed/assets/1486634/173b94b1-4d88-4333-b980-8fed937e6f6d

Release Notes:

- Added `experimental.theme_overrides` to `settings.json` to allow for
customizing the current theme.
  - This setting is experimental and subject to change.
2024-01-26 13:42:58 -05:00

47 lines
1.2 KiB
TOML

[package]
name = "theme"
version = "0.1.0"
edition = "2021"
publish = false
license = "GPL-3.0-only"
[features]
default = []
importing-themes = []
stories = ["dep:itertools", "dep:story"]
test-support = [
"gpui/test-support",
"fs/test-support",
"settings/test-support"
]
[lib]
path = "src/theme.rs"
doctest = false
[dependencies]
anyhow.workspace = true
fs = { path = "../fs" }
gpui = { path = "../gpui" }
indexmap = { version = "1.6.2", features = ["serde"] }
palette = { version = "0.7.3", default-features = false, features = ["std"] }
parking_lot.workspace = true
refineable.workspace = true
schemars = { workspace = true, features = ["indexmap"] }
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
settings = { path = "../settings" }
story = { path = "../story", optional = true }
toml.workspace = true
uuid.workspace = true
util = { path = "../util" }
color = {path = "../color"}
itertools = { version = "0.11.0", optional = true }
[dev-dependencies]
gpui = { path = "../gpui", features = ["test-support"] }
fs = { path = "../fs", features = ["test-support"] }
settings = { path = "../settings", features = ["test-support"] }