Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Properly emit `UserHighlightStyle`s
Marshall Bowers34e31fd4895b
diff --git a/crates/theme2/src/themes/andromeda.rs b/crates/theme2/src/themes/andromeda.rsindex 00973f0f516..e48f58a7a2b 100644--- a/crates/theme2/src/themes/andromeda.rs+++ b/crates/theme2/src/themes/andromeda.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn andromeda() -> UserThemeFamily {@@ -61,9 +61,27 @@ pub fn andromeda() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x9fa0a6cc).into()),- ("something".into(), rgba(0x95e072ff).into()),- ("punctuation".into(), rgba(0x95e072ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x95e072ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x95e072ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x9fa0a6cc).into()),+ ..Default::default()+ },+ ),],}),},@@ -116,9 +134,27 @@ pub fn andromeda() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x95e072ff).into()),- ("comment".into(), rgba(0x9fa0a6cc).into()),- ("something".into(), rgba(0x95e072ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x95e072ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x95e072ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x9fa0a6cc).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/ayu.rs b/crates/theme2/src/themes/ayu.rsindex 47d50d96c45..0401ff46a25 100644--- a/crates/theme2/src/themes/ayu.rs+++ b/crates/theme2/src/themes/ayu.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn ayu() -> UserThemeFamily {@@ -65,9 +65,27 @@ pub fn ayu() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0xfa8d3eff).into()),- ("punctuation".into(), rgba(0x787b8099).into()),- ("comment".into(), rgba(0x787b8099).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfa8d3eff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x787b8099).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x787b8099).into()),+ ..Default::default()+ },+ ),],}),},@@ -124,9 +142,27 @@ pub fn ayu() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0xffad65ff).into()),- ("comment".into(), rgba(0xb8cfe680).into()),- ("punctuation".into(), rgba(0xb8cfe680).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xb8cfe680).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xffad65ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0xb8cfe680).into()),+ ..Default::default()+ },+ ),],}),},@@ -183,9 +219,27 @@ pub fn ayu() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0xabb5be8c).into()),- ("something".into(), rgba(0xff8f3fff).into()),- ("punctuation".into(), rgba(0xabb5be8c).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0xabb5be8c).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xabb5be8c).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xff8f3fff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/dracula.rs b/crates/theme2/src/themes/dracula.rsindex d8b97589ab7..716ece161e9 100644--- a/crates/theme2/src/themes/dracula.rs+++ b/crates/theme2/src/themes/dracula.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn dracula() -> UserThemeFamily {@@ -66,9 +66,27 @@ pub fn dracula() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x6272a4ff).into()),- ("something".into(), rgba(0xf8f8f2ff).into()),- ("punctuation".into(), rgba(0xff79c6ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x6272a4ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xff79c6ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xf8f8f2ff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rsindex a7a3a42f19d..1d4da9922ed 100644--- a/crates/theme2/src/themes/gruvbox.rs+++ b/crates/theme2/src/themes/gruvbox.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn gruvbox() -> UserThemeFamily {@@ -64,9 +64,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x928374ff).into()),- ("something".into(), rgba(0x83a598ff).into()),- ("punctuation".into(), rgba(0x83a598ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -122,9 +140,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x83a598ff).into()),- ("comment".into(), rgba(0x928374ff).into()),- ("punctuation".into(), rgba(0x83a598ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -180,9 +216,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x928374ff).into()),- ("something".into(), rgba(0x83a598ff).into()),- ("punctuation".into(), rgba(0x83a598ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x83a598ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -238,9 +292,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x928374ff).into()),- ("something".into(), rgba(0x066578ff).into()),- ("punctuation".into(), rgba(0x066578ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -296,9 +368,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x066578ff).into()),- ("comment".into(), rgba(0x928374ff).into()),- ("punctuation".into(), rgba(0x066578ff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -354,9 +444,27 @@ pub fn gruvbox() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x066578ff).into()),- ("comment".into(), rgba(0x928374ff).into()),- ("punctuation".into(), rgba(0x066578ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x928374ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x066578ff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/night_owl.rs b/crates/theme2/src/themes/night_owl.rsindex a0a11b9aa1f..2d5b1bd26be 100644--- a/crates/theme2/src/themes/night_owl.rs+++ b/crates/theme2/src/themes/night_owl.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn night_owl() -> UserThemeFamily {@@ -65,9 +65,27 @@ pub fn night_owl() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x637777ff).into()),- ("something".into(), rgba(0x7fcac3ff).into()),- ("punctuation".into(), rgba(0xd3413dff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd3413dff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x637777ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x7fcac3ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -125,9 +143,27 @@ pub fn night_owl() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x989fb1ff).into()),- ("something".into(), rgba(0x0b969bff).into()),- ("punctuation".into(), rgba(0xd3413dff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x0b969bff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x989fb1ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd3413dff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rsindex eb0deed4f09..1a6e942b1fc 100644--- a/crates/theme2/src/themes/nord.rs+++ b/crates/theme2/src/themes/nord.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn nord() -> UserThemeFamily {@@ -66,9 +66,27 @@ pub fn nord() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x606e87ff).into()),- ("punctuation".into(), rgba(0x81a1c1ff).into()),- ("something".into(), rgba(0xa3be8cff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xa3be8cff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x606e87ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x81a1c1ff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/notctis.rs b/crates/theme2/src/themes/notctis.rsindex 437fa982984..cab9f395307 100644--- a/crates/theme2/src/themes/notctis.rs+++ b/crates/theme2/src/themes/notctis.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn notctis() -> UserThemeFamily {@@ -67,9 +67,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x5888a5ff).into()),- ("something".into(), rgba(0x49e9a6ff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5888a5ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -128,9 +146,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x8b737bff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),- ("something".into(), rgba(0x49e9a6ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x8b737bff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -189,9 +225,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x0094f0ff).into()),- ("something".into(), rgba(0x00b368ff).into()),- ("comment".into(), rgba(0x8ca6a6ff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x00b368ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x8ca6a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x0094f0ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -250,9 +304,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x9995b7ff).into()),- ("punctuation".into(), rgba(0x0094f0ff).into()),- ("something".into(), rgba(0x00b368ff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x00b368ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x9995b7ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x0094f0ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -311,9 +383,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x0094f0ff).into()),- ("comment".into(), rgba(0x8ca6a6ff).into()),- ("something".into(), rgba(0x00b368ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x0094f0ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x8ca6a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x00b368ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -372,9 +462,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x5897bfff).into()),- ("comment".into(), rgba(0x5d7787ff).into()),- ("something".into(), rgba(0x72c09fff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x72c09fff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5d7787ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5897bfff).into()),+ ..Default::default()+ },+ ),],}),},@@ -433,9 +541,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x5b858bff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),- ("something".into(), rgba(0x49e9a6ff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5b858bff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -494,9 +620,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x49e9a6ff).into()),- ("comment".into(), rgba(0x5b858bff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5b858bff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -555,9 +699,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x49e9a6ff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),- ("comment".into(), rgba(0x5b858bff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5b858bff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -616,9 +778,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x49ace9ff).into()),- ("comment".into(), rgba(0x716b93ff).into()),- ("something".into(), rgba(0x49e9a6ff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x716b93ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -677,9 +857,27 @@ pub fn notctis() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x49e9a6ff).into()),- ("comment".into(), rgba(0x7e6499ff).into()),- ("punctuation".into(), rgba(0x49ace9ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x7e6499ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49e9a6ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x49ace9ff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/palenight.rs b/crates/theme2/src/themes/palenight.rsindex 679fe1514c7..94e00247826 100644--- a/crates/theme2/src/themes/palenight.rs+++ b/crates/theme2/src/themes/palenight.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn palenight() -> UserThemeFamily {@@ -65,9 +65,27 @@ pub fn palenight() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0xd3413dff).into()),- ("something".into(), rgba(0x7fcac3ff).into()),- ("comment".into(), rgba(0x687097ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x687097ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x7fcac3ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd3413dff).into()),+ ..Default::default()+ },+ ),],}),},@@ -124,9 +142,27 @@ pub fn palenight() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x7fcac3ff).into()),- ("comment".into(), rgba(0x687097ff).into()),- ("punctuation".into(), rgba(0xd3413dff).into()),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x7fcac3ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x687097ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd3413dff).into()),+ ..Default::default()+ },+ ),],}),},@@ -183,9 +219,27 @@ pub fn palenight() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("something".into(), rgba(0x7fcac3ff).into()),- ("comment".into(), rgba(0x687097ff).into()),- ("punctuation".into(), rgba(0xd3413dff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x687097ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x7fcac3ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd3413dff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/rose_pine.rs b/crates/theme2/src/themes/rose_pine.rsindex 353fcd10d36..6d5f6b256dd 100644--- a/crates/theme2/src/themes/rose_pine.rs+++ b/crates/theme2/src/themes/rose_pine.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn rose_pine() -> UserThemeFamily {@@ -66,9 +66,27 @@ pub fn rose_pine() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("punctuation".into(), rgba(0x6e6a86ff).into()),- ("comment".into(), rgba(0x6e6a86ff).into()),- ("something".into(), rgba(0xebbcbaff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x6e6a86ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xebbcbaff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x6e6a86ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -126,9 +144,27 @@ pub fn rose_pine() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x6e6a86ff).into()),- ("something".into(), rgba(0xea9a97ff).into()),- ("punctuation".into(), rgba(0x6e6a86ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x6e6a86ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xea9a97ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x6e6a86ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -186,9 +222,27 @@ pub fn rose_pine() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x9893a5ff).into()),- ("punctuation".into(), rgba(0x9893a5ff).into()),- ("something".into(), rgba(0xd7827dff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x9893a5ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x9893a5ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xd7827dff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rsindex e970dd7b0c2..538beff8ba1 100644--- a/crates/theme2/src/themes/solarized.rs+++ b/crates/theme2/src/themes/solarized.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn solarized() -> UserThemeFamily {@@ -61,9 +61,27 @@ pub fn solarized() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x657b83ff).into()),- ("something".into(), rgba(0x93a1a1ff).into()),- ("punctuation".into(), rgba(0x657b83ff).into()),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x657b83ff).into()),+ ..Default::default()+ },+ ),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x657b83ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x93a1a1ff).into()),+ ..Default::default()+ },+ ),],}),},@@ -113,9 +131,27 @@ pub fn solarized() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x93a1a1ff).into()),- ("punctuation".into(), rgba(0x93a1a1ff).into()),- ("something".into(), rgba(0x657b83ff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x93a1a1ff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0x93a1a1ff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0x657b83ff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme2/src/themes/synthwave_84.rs b/crates/theme2/src/themes/synthwave_84.rsindex 2eef9e908fa..eec0fe4e143 100644--- a/crates/theme2/src/themes/synthwave_84.rs+++ b/crates/theme2/src/themes/synthwave_84.rs@@ -4,8 +4,8 @@use gpui::rgba;use crate::{- Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserTheme, UserThemeFamily,- UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,};pub fn synthwave_84() -> UserThemeFamily {@@ -51,9 +51,27 @@ pub fn synthwave_84() -> UserThemeFamily {},syntax: Some(UserSyntaxTheme {highlights: vec![- ("comment".into(), rgba(0x848bbdff).into()),- ("something".into(), rgba(0xfe444fff).into()),- ("punctuation".into(), rgba(0xfede5cff).into()),+ (+ "comment".into(),+ UserHighlightStyle {+ color: Some(rgba(0x848bbdff).into()),+ ..Default::default()+ },+ ),+ (+ "punctuation".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfede5cff).into()),+ ..Default::default()+ },+ ),+ (+ "something".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfe444fff).into()),+ ..Default::default()+ },+ ),],}),},diff --git a/crates/theme_importer/src/main.rs b/crates/theme_importer/src/main.rsindex a92e753f85d..052ee5cf3af 100644--- a/crates/theme_importer/src/main.rs+++ b/crates/theme_importer/src/main.rs@@ -160,7 +160,8 @@ fn main() -> Result<()> {use gpui::rgba;use crate::{{- Appearance, ThemeColorsRefinement, StatusColorsRefinement, UserTheme, UserThemeFamily, UserThemeStylesRefinement,+ Appearance, StatusColorsRefinement, ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme,+ UserTheme, UserThemeFamily, UserThemeStylesRefinement,}};pub fn {theme_family_slug}() -> UserThemeFamily {{diff --git a/crates/theme_importer/src/theme_printer.rs b/crates/theme_importer/src/theme_printer.rsindex e114584d836..f99030b4aa3 100644--- a/crates/theme_importer/src/theme_printer.rs+++ b/crates/theme_importer/src/theme_printer.rs@@ -3,7 +3,8 @@ use std::fmt::{self, Debug};use gpui::{Hsla, Rgba};use theme::{Appearance, PlayerColor, PlayerColors, StatusColorsRefinement, SystemColors,- ThemeColorsRefinement, UserSyntaxTheme, UserTheme, UserThemeFamily, UserThemeStylesRefinement,+ ThemeColorsRefinement, UserHighlightStyle, UserSyntaxTheme, UserTheme, UserThemeFamily,+ UserThemeStylesRefinement,};struct RawSyntaxPrinter<'a>(&'a str);@@ -350,7 +351,7 @@ impl<'a> Debug for UserSyntaxThemePrinter<'a> {.highlights.iter().map(|(token, highlight)| {- (IntoPrinter(token), HslaPrinter(highlight.color.unwrap()))+ (IntoPrinter(token), UserHighlightStylePrinter(&highlight))}).collect(),),@@ -358,3 +359,27 @@ impl<'a> Debug for UserSyntaxThemePrinter<'a> {.finish()}}++pub struct UserHighlightStylePrinter<'a>(&'a UserHighlightStyle);++impl<'a> Debug for UserHighlightStylePrinter<'a> {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ let fields = vec![("color", self.0.color)];++ f.write_str("UserHighlightStyle {")?;++ for (field_name, value) in fields {+ if let Some(color) = value {+ f.write_str(field_name)?;+ f.write_str(": ")?;+ f.write_str("Some(")?;+ HslaPrinter(color).fmt(f)?;+ f.write_str(")")?;+ f.write_str(",")?;+ }+ }++ f.write_str("..Default::default()")?;+ f.write_str("}")+ }+}