summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo60228 <iakornfeld@gmail.com>2020-11-19 12:47:10 -0500
committerThomas Vigouroux <tomvig38@gmail.com>2020-11-22 22:29:55 +0100
commita0e14a5672c91c9ee9f2e3e7fd37c1cfc42a397a (patch)
tree02410646c0230ad2b34dcc31af10eb5a36b7b7a2
parent5a25817884df7459f83f453da54465376c60c081 (diff)
Fix unary - precedence
-rw-r--r--queries/nix/highlights.scm24
1 files changed, 12 insertions, 12 deletions
diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm
index 5ed5aaa9..4ee2da98 100644
--- a/queries/nix/highlights.scm
+++ b/queries/nix/highlights.scm
@@ -79,18 +79,6 @@
(attrset (bind . (attrpath (identifier) @field)))
(rec_attrset (bind . (attrpath (identifier) @field)))
-; integers, also highlight a unary -
-[
- (unary "-" (integer))
- (integer)
-] @number
-
-; floats, also highlight a unary -
-[
- (unary "-" (float))
- (float)
-] @float
-
; unary operators
(unary "-" @operator)
(unary "!" @operator)
@@ -112,3 +100,15 @@
(binary "&&" @operator)
(binary "||" @operator)
(binary "->" @operator)
+
+; integers, also highlight a unary -
+[
+ (unary "-" (integer))
+ (integer)
+] @number
+
+; floats, also highlight a unary -
+[
+ (unary "-" (float))
+ (float)
+] @float