Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Improve matching for preprocessor tokens
Marshall Bowers63ce7cd407ca
diff --git a/crates/theme2/src/themes/gruvbox.rs b/crates/theme2/src/themes/gruvbox.rsindex 1ada65400f5..5674593c2d8 100644--- a/crates/theme2/src/themes/gruvbox.rs+++ b/crates/theme2/src/themes/gruvbox.rs@@ -141,6 +141,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfe8019ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -391,6 +398,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfe8019ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -641,6 +655,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xfe8019ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -891,6 +912,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xaf3a03ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1141,6 +1169,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xaf3a03ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1391,6 +1426,13 @@ pub fn gruvbox() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xaf3a03ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {diff --git a/crates/theme2/src/themes/noctis.rs b/crates/theme2/src/themes/noctis.rsindex caba6947fe9..e09efd98c6a 100644--- a/crates/theme2/src/themes/noctis.rs+++ b/crates/theme2/src/themes/noctis.rs@@ -143,6 +143,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -395,6 +402,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -647,6 +661,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xff5792ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -899,6 +920,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xff5792ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1151,6 +1179,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xff5792ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1403,6 +1438,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xc88da2ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1655,6 +1697,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -1907,6 +1956,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -2159,6 +2215,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -2411,6 +2474,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -2663,6 +2733,13 @@ pub fn noctis() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xdf769bff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {diff --git a/crates/theme2/src/themes/nord.rs b/crates/theme2/src/themes/nord.rsindex da03c82878a..42065980869 100644--- a/crates/theme2/src/themes/nord.rs+++ b/crates/theme2/src/themes/nord.rs@@ -135,6 +135,13 @@ pub fn nord() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0x5e81acff).into()),+ ..Default::default()+ },+ ),("punctuation".into(),UserHighlightStyle {diff --git a/crates/theme2/src/themes/solarized.rs b/crates/theme2/src/themes/solarized.rsindex 7cec48b1f48..5d43b5704af 100644--- a/crates/theme2/src/themes/solarized.rs+++ b/crates/theme2/src/themes/solarized.rs@@ -145,6 +145,13 @@ pub fn solarized() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xb58900ff).into()),+ ..Default::default()+ },+ ),("property".into(),UserHighlightStyle {@@ -389,6 +396,13 @@ pub fn solarized() -> UserThemeFamily {..Default::default()},),+ (+ "preproc".into(),+ UserHighlightStyle {+ color: Some(rgba(0xb58900ff).into()),+ ..Default::default()+ },+ ),("punctuation.bracket".into(),UserHighlightStyle {diff --git a/crates/theme_importer/src/vscode/syntax.rs b/crates/theme_importer/src/vscode/syntax.rsindex d5097639cba..990355065f8 100644--- a/crates/theme_importer/src/vscode/syntax.rs+++ b/crates/theme_importer/src/vscode/syntax.rs@@ -219,7 +219,11 @@ impl ZedSyntaxToken {ZedSyntaxToken::Number => vec!["constant.numeric", "number"],ZedSyntaxToken::Operator => vec!["operator", "keyword.operator"],ZedSyntaxToken::Predictive => vec![],- ZedSyntaxToken::Preproc => vec!["preproc"],+ ZedSyntaxToken::Preproc => vec![+ "preproc",+ "meta.preprocessor",+ "punctuation.definition.preprocessor",+ ],ZedSyntaxToken::Primary => vec![],ZedSyntaxToken::Property => vec!["variable.member",