WIP – Add Syntax themes to importer

Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
This commit is contained in:
Nate Butler 2023-11-09 12:30:53 -05:00
parent 4b5ca3e420
commit efd1db1b09
19 changed files with 553 additions and 1724 deletions

View file

@ -1,3 +1,4 @@
use gpui::Hsla;
use refineable::Refineable;
use serde::Deserialize;
@ -24,4 +25,21 @@ pub struct UserThemeStyles {
pub colors: ThemeColors,
#[refineable]
pub status: StatusColors,
pub syntax: UserSyntaxTheme,
}
#[derive(Clone, Default, Deserialize)]
pub struct UserSyntaxTheme {
pub highlights: Vec<(String, UserHighlightStyle)>,
}
#[derive(Clone, Default, Deserialize)]
pub struct UserHighlightStyle {
pub color: Option<Hsla>,
}
impl UserHighlightStyle {
pub fn is_empty(&self) -> bool {
self.color.is_none()
}
}