Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
languages: Fix C/C++ preprocessor directive highlight regression (#49031)
Wuji Chenc4d700446eaa
diff --git a/assets/themes/ayu/ayu.json b/assets/themes/ayu/ayu.jsonindex c62f9eb1123..f27566c4f72 100644--- a/assets/themes/ayu/ayu.json+++ b/assets/themes/ayu/ayu.json@@ -283,7 +283,7 @@"font_weight": null},"preproc": {- "color": "#bfbdb6ff",+ "color": "#ff8f3fff","font_style": null,"font_weight": null},@@ -685,7 +685,7 @@"font_weight": null},"preproc": {- "color": "#5c6166ff",+ "color": "#fa8d3eff","font_style": null,"font_weight": null},@@ -1087,7 +1087,7 @@"font_weight": null},"preproc": {- "color": "#cccac2ff",+ "color": "#ffad65ff","font_style": null,"font_weight": null},diff --git a/assets/themes/gruvbox/gruvbox.json b/assets/themes/gruvbox/gruvbox.jsonindex a4fc1b561b3..4330df54fcc 100644--- a/assets/themes/gruvbox/gruvbox.json+++ b/assets/themes/gruvbox/gruvbox.json@@ -293,7 +293,7 @@"font_weight": null},"preproc": {- "color": "#fbf1c7ff",+ "color": "#fb4833ff","font_style": null,"font_weight": null},@@ -710,7 +710,7 @@"font_weight": null},"preproc": {- "color": "#fbf1c7ff",+ "color": "#fb4833ff","font_style": null,"font_weight": null},@@ -1127,7 +1127,7 @@"font_weight": null},"preproc": {- "color": "#fbf1c7ff",+ "color": "#fb4833ff","font_style": null,"font_weight": null},@@ -1544,7 +1544,7 @@"font_weight": null},"preproc": {- "color": "#282828ff",+ "color": "#9d0006ff","font_style": null,"font_weight": null},@@ -1961,7 +1961,7 @@"font_weight": null},"preproc": {- "color": "#282828ff",+ "color": "#9d0006ff","font_style": null,"font_weight": null},@@ -2378,7 +2378,7 @@"font_weight": null},"preproc": {- "color": "#282828ff",+ "color": "#9d0006ff","font_style": null,"font_weight": null},diff --git a/assets/themes/one/one.json b/assets/themes/one/one.jsonindex 409a5c705c5..e60b6314b95 100644--- a/assets/themes/one/one.json+++ b/assets/themes/one/one.json@@ -290,7 +290,7 @@"font_weight": null},"preproc": {- "color": "#dce0e5ff",+ "color": "#b477cfff","font_style": null,"font_weight": null},@@ -702,7 +702,7 @@"font_weight": null},"preproc": {- "color": "#242529ff",+ "color": "#a449abff","font_style": null,"font_weight": null},diff --git a/crates/grammars/src/c/highlights.scm b/crates/grammars/src/c/highlights.scmindex dc5a3bd9993..b73c8e80b8a 100644--- a/crates/grammars/src/c/highlights.scm+++ b/crates/grammars/src/c/highlights.scm@@ -38,7 +38,7 @@"#ifndef""#include"(preproc_directive)-] @preproc+] @keyword.preproc @preproc["="diff --git a/crates/grammars/src/cpp/highlights.scm b/crates/grammars/src/cpp/highlights.scmindex e074707d05d..281da4215c8 100644--- a/crates/grammars/src/cpp/highlights.scm+++ b/crates/grammars/src/cpp/highlights.scm@@ -196,7 +196,7 @@ type: (primitive_type) @type.builtin"#ifndef""#include"(preproc_directive)-] @preproc+] @keyword.preproc @preproc(comment) @commentdiff --git a/crates/theme/src/fallback_themes.rs b/crates/theme/src/fallback_themes.rsindex a3831cafff6..a739df3213d 100644--- a/crates/theme/src/fallback_themes.rs+++ b/crates/theme/src/fallback_themes.rs@@ -357,7 +357,7 @@ pub(crate) fn zed_default_dark() -> Theme {("number".into(), orange.into()),("operator".into(), HighlightStyle::default()),("predictive".into(), HighlightStyle::default()),- ("preproc".into(), HighlightStyle::default()),+ ("preproc".into(), purple.into()),("primary".into(), HighlightStyle::default()),("property".into(), red.into()),("punctuation".into(), HighlightStyle::default()),