Skip to content

Commit

Permalink
Fix null and boolean constants in tree-sitter-nix highlights queries (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp-M authored Jan 6, 2022
1 parent 3e4f815 commit 66afbc9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runtime/queries/nix/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
] @keyword

((identifier) @variable.builtin
(#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins|false|null|true)$")
(#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$")
(#is-not? local))

((identifier) @function.builtin
Expand All @@ -33,6 +33,11 @@

(uri) @string.special.uri

; boolean
((identifier) @constant.builtin.boolean (#match? @constant.builtin.boolean "^(true|false)$")) @constant.builtin.boolean
; null
((identifier) @constant.builtin (#eq? @constant.builtin "null")) @constant.builtin

(integer) @constant.numeric.integer
(float) @constant.numeric.float

Expand Down

0 comments on commit 66afbc9

Please sign in to comment.