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

Release Notes:

- Fixed issue where `true` and `false` were highlighted as constants,
ignoring the `boolean` highlight defined in themes.
  - This fix applies to: C, C++, Go, JSON, JSONC, Python, and Rust.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
everdrone
2025-02-21 15:26:52 +00:00
committed by GitHub
co-authored by Marshall Bowers
parent 3c4903c6bf
commit 1fb4620a90
7 changed files with 20 additions and 4 deletions
+3 -2
View File
@@ -102,8 +102,9 @@
[
(true)
(false)
(null)
] @constant
] @boolean
(null) @constant
(identifier) @variable
+3
View File
@@ -153,6 +153,9 @@ type :(primitive_type) @type.primitive
[
(true)
(false)
] @boolean
[
(null)
("nullptr")
] @constant
+3
View File
@@ -118,6 +118,9 @@
[
(true)
(false)
] @boolean
[
(nil)
(iota)
] @constant.builtin
+3
View File
@@ -11,6 +11,9 @@
[
(true)
(false)
] @boolean
[
(null)
] @constant
@@ -11,6 +11,9 @@
[
(true)
(false)
] @boolean
[
(null)
] @constant
+4 -1
View File
@@ -95,9 +95,12 @@
; Literals
[
(none)
(true)
(false)
] @boolean
[
(none)
(ellipsis)
] @constant.builtin
+1 -1
View File
@@ -129,7 +129,7 @@
(float_literal)
] @number
(boolean_literal) @constant
(boolean_literal) @boolean
[
(line_comment)