Add player colors to serialized themes (#6887)

This PR adds player colors to serialized themes.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-01-27 13:50:33 -05:00 committed by GitHub
parent 0fe0683ef4
commit a2efc8da7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 1666 additions and 3 deletions

View file

@ -59,6 +59,9 @@ pub struct ThemeStyleContent {
#[serde(flatten, default)]
pub status: StatusColorsContent,
#[serde(default)]
pub players: Vec<PlayerColorContent>,
/// The styles for syntax nodes.
#[serde(default)]
pub syntax: IndexMap<String, HighlightStyleContent>,
@ -1153,6 +1156,13 @@ impl StatusColorsContent {
}
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct PlayerColorContent {
pub cursor: Option<String>,
pub background: Option<String>,
pub selection: Option<String>,
}
#[derive(Debug, Clone, Copy, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum FontStyleContent {