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:
parent
3c4903c6bf
commit
1fb4620a90
7 changed files with 20 additions and 4 deletions
|
@ -102,8 +102,9 @@
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
(null)
|
] @boolean
|
||||||
] @constant
|
|
||||||
|
(null) @constant
|
||||||
|
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,9 @@ type :(primitive_type) @type.primitive
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
[
|
||||||
(null)
|
(null)
|
||||||
("nullptr")
|
("nullptr")
|
||||||
] @constant
|
] @constant
|
||||||
|
|
|
@ -118,6 +118,9 @@
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
[
|
||||||
(nil)
|
(nil)
|
||||||
(iota)
|
(iota)
|
||||||
] @constant.builtin
|
] @constant.builtin
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
[
|
||||||
(null)
|
(null)
|
||||||
] @constant
|
] @constant
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
[
|
||||||
(null)
|
(null)
|
||||||
] @constant
|
] @constant
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,12 @@
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
[
|
[
|
||||||
(none)
|
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
[
|
||||||
|
(none)
|
||||||
(ellipsis)
|
(ellipsis)
|
||||||
] @constant.builtin
|
] @constant.builtin
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
(float_literal)
|
(float_literal)
|
||||||
] @number
|
] @number
|
||||||
|
|
||||||
(boolean_literal) @constant
|
(boolean_literal) @boolean
|
||||||
|
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue