From 9857fd233dc22cc2c44fc5c12d8d8620154d0a73 Mon Sep 17 00:00:00 2001 From: lipcut <96253127+lipcut@users.noreply.github.com> Date: Wed, 3 Dec 2025 16:30:54 +0800 Subject: [PATCH] Make highlighting of C preprocessing directive same as C++ (#44043) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Small fix for consistency between C and C++ highlighting. Related to https://github.com/zed-industries/zed/issues/9461 Release Notes: - Change syntax highlighting for preprocessing directive in C so it can be configured with `keyword.directive` instead of being treated as other `keyword`. The behavior should be like the C++ one now. 圖片 --- crates/languages/src/c/highlights.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/languages/src/c/highlights.scm b/crates/languages/src/c/highlights.scm index 40e0d7147e98287f5ed7587d690e25bc8bacaa0b..46c970e69d97a232dc9d83aa6b9470de74f74833 100644 --- a/crates/languages/src/c/highlights.scm +++ b/crates/languages/src/c/highlights.scm @@ -36,7 +36,7 @@ "#ifndef" "#include" (preproc_directive) -] @keyword +] @keyword.directive [ "="