Checkpoint
This commit is contained in:
@@ -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"] }
|
||||
@@ -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 }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user