Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Use `@boolean` for `true` and `false` in highlights (#25338)

everdrone1fb4620a9050
diff --git a/crates/languages/src/c/highlights.scm b/crates/languages/src/c/highlights.scm
index 634f8d81c4a..ef15a4b3453 100644
--- a/crates/languages/src/c/highlights.scm
+++ b/crates/languages/src/c/highlights.scm
@@ -102,8 +102,9 @@
[
(true)
(false)
- (null)
-] @constant
+] @boolean
+
+(null) @constant
(identifier) @variable
diff --git a/crates/languages/src/cpp/highlights.scm b/crates/languages/src/cpp/highlights.scm
index 2df9ec2923b..2a8235de1fa 100644
--- a/crates/languages/src/cpp/highlights.scm
+++ b/crates/languages/src/cpp/highlights.scm
@@ -153,6 +153,9 @@ type :(primitive_type) @type.primitive
[
(true)
(false)
+] @boolean
+
+[
(null)
("nullptr")
] @constant
diff --git a/crates/languages/src/go/highlights.scm b/crates/languages/src/go/highlights.scm
index 609c49c13f5..7e594a5c126 100644
--- a/crates/languages/src/go/highlights.scm
+++ b/crates/languages/src/go/highlights.scm
@@ -118,6 +118,9 @@
[
(true)
(false)
+] @boolean
+
+[
(nil)
(iota)
] @constant.builtin
diff --git a/crates/languages/src/json/highlights.scm b/crates/languages/src/json/highlights.scm
index 8cf7a6d20dc..c3186af264e 100644
--- a/crates/languages/src/json/highlights.scm
+++ b/crates/languages/src/json/highlights.scm
@@ -11,6 +11,9 @@
[
(true)
(false)
+] @boolean
+
+[
(null)
] @constant
diff --git a/crates/languages/src/jsonc/highlights.scm b/crates/languages/src/jsonc/highlights.scm
index 8cf7a6d20dc..c3186af264e 100644
--- a/crates/languages/src/jsonc/highlights.scm
+++ b/crates/languages/src/jsonc/highlights.scm
@@ -11,6 +11,9 @@
[
(true)
(false)
+] @boolean
+
+[
(null)
] @constant
diff --git a/crates/languages/src/python/highlights.scm b/crates/languages/src/python/highlights.scm
index 0495f87716b..e3e38aafedf 100644
--- a/crates/languages/src/python/highlights.scm
+++ b/crates/languages/src/python/highlights.scm
@@ -95,9 +95,12 @@
; Literals
[
- (none)
(true)
(false)
+] @boolean
+
+[
+ (none)
(ellipsis)
] @constant.builtin
diff --git a/crates/languages/src/rust/highlights.scm b/crates/languages/src/rust/highlights.scm
index d25b8a73471..bd5221f1e60 100644
--- a/crates/languages/src/rust/highlights.scm
+++ b/crates/languages/src/rust/highlights.scm
@@ -129,7 +129,7 @@
(float_literal)
] @number
-(boolean_literal) @constant
+(boolean_literal) @boolean
[
(line_comment)