Skip to content

Commit

Permalink
Use @boolean for true|false in highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
everdrone committed Feb 21, 2025
1 parent 2f416ae commit ed4c961
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 4 deletions.
5 changes: 3 additions & 2 deletions crates/languages/src/c/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@
[
(true)
(false)
(null)
] @constant
] @boolean

(null) @constant

(identifier) @variable

Expand Down
3 changes: 3 additions & 0 deletions crates/languages/src/cpp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ type :(primitive_type) @type.primitive
[
(true)
(false)
] @boolean

[
(null)
("nullptr")
] @constant
Expand Down
3 changes: 3 additions & 0 deletions crates/languages/src/go/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@
[
(true)
(false)
] @boolean

[
(nil)
(iota)
] @constant.builtin
Expand Down
3 changes: 3 additions & 0 deletions crates/languages/src/json/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
[
(true)
(false)
] @boolean

[
(null)
] @constant

Expand Down
3 changes: 3 additions & 0 deletions crates/languages/src/jsonc/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
[
(true)
(false)
] @boolean

[
(null)
] @constant

Expand Down
5 changes: 4 additions & 1 deletion crates/languages/src/python/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@
; Literals

[
(none)
(true)
(false)
] @boolean

[
(none)
(ellipsis)
] @constant.builtin

Expand Down
3 changes: 2 additions & 1 deletion crates/languages/src/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"mod"
"move"
"pub"
"raw"
"ref"
"return"
"static"
Expand Down Expand Up @@ -129,7 +130,7 @@
(float_literal)
] @number

(boolean_literal) @constant
(boolean_literal) @boolean

[
(line_comment)
Expand Down

0 comments on commit ed4c961

Please sign in to comment.