Checkpoint

This commit is contained in:
Antonio Scandurra
2023-10-23 10:59:29 +02:00
parent a0b667a2ca
commit 56462ef793
23 changed files with 4833 additions and 2536 deletions
+35
View File
@@ -0,0 +1,35 @@
[package]
name = "theme2"
version = "0.1.0"
edition = "2021"
publish = false
[features]
test-support = [
"gpui2/test-support",
"fs/test-support",
"settings2/test-support"
]
[lib]
path = "src/theme2.rs"
doctest = false
[dependencies]
gpui2 = { path = "../gpui2" }
fs = { path = "../fs" }
settings2 = { path = "../settings2" }
util = { path = "../util" }
anyhow.workspace = true
indexmap = "1.6.2"
parking_lot.workspace = true
serde.workspace = true
serde_derive.workspace = true
serde_json.workspace = true
toml.workspace = true
[dev-dependencies]
gpui2 = { path = "../gpui2", features = ["test-support"] }
fs = { path = "../fs", features = ["test-support"] }
settings2 = { path = "../settings2", features = ["test-support"] }
+21
View File
@@ -0,0 +1,21 @@
use gpui2::HighlightStyle;
use std::sync::Arc;
pub struct Theme {
pub editor: Editor,
}
pub struct Editor {
pub syntax: Arc<SyntaxTheme>,
}
#[derive(Default)]
pub struct SyntaxTheme {
pub highlights: Vec<(String, HighlightStyle)>,
}
impl SyntaxTheme {
pub fn new(highlights: Vec<(String, HighlightStyle)>) -> Self {
Self { highlights }
}
}