zed/crates/theme/Cargo.toml
Marshall Bowers 9cb5a84b8d
Add support for loading user themes (#7027)
This PR adds support for loading user themes in Zed.

Themes are loaded from the `themes` directory under the Zed config:
`~/.config/zed/themes`. This directory should contain JSON files
containing a `ThemeFamilyContent`.

Here's an example of the general structure of a theme family file:

```jsonc
{
  "name": "Vitesse",
  "author": "Anthony Fu",
  "themes": [
    {
      "name": "Vitesse Dark Soft",
      "appearance": "dark",
      "style": {
        "border": "#252525",
        // ...
      }
    }
  ]
}
```

Themes placed in this directory will be loaded and available in the
theme selector.

Release Notes:

- Added support for loading user themes from `~/.config/zed/themes`.
2024-01-29 21:32:45 -05:00

49 lines
1.2 KiB
TOML

[package]
name = "theme"
version = "0.1.0"
edition = "2021"
publish = false
license = "GPL-3.0-or-later"
[features]
default = []
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
derive_more.workspace = true
fs = { path = "../fs" }
futures.workspace = true
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
serde_repr.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"] }