ZIm/crates/theme2/Cargo.toml
Marshall Bowers 0d95410634
Rework third-party themes (#3254)
This PR reworks the way we define our third-party themes to make them
work as overlays on top of a base theme.

We introduce the concept of a `UserThemeFamily` that contains
`UserTheme`s. Rather than being an entire theme definition on their own,
a `UserTheme` just contains optional overrides for the values in a
`Theme`.

When resolving a `UserTheme`, we apply it on top of the base theme. Any
values not overridden in the `UserTheme` will fall back to the `Theme`
defaults.

Right now we are just using `UserTheme` to model third-party themes that
we distribute with the Zed binary. However, this same structure can also
be used to import arbitrary user themes (such as from a theme registry,
or even a theme blob from the settings file).

Release Notes:

- N/A
2023-11-07 11:40:07 -05:00

37 lines
932 B
TOML

[package]
name = "theme2"
version = "0.1.0"
edition = "2021"
publish = false
[features]
test-support = [
"gpui/test-support",
"fs/test-support",
"settings/test-support"
]
[lib]
path = "src/theme2.rs"
doctest = false
[dependencies]
anyhow.workspace = true
fs = { package = "fs2", path = "../fs2" }
gpui = { package = "gpui2", path = "../gpui2" }
indexmap = "1.6.2"
parking_lot.workspace = true
refineable.workspace = true
schemars.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
settings = { package = "settings2", path = "../settings2" }
toml.workspace = true
uuid.workspace = true
util = { path = "../util" }
[dev-dependencies]
gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] }
fs = { package = "fs2", path = "../fs2", features = ["test-support"] }
settings = { package = "settings2", path = "../settings2", features = ["test-support"] }