Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/nix/highlights.scm')
-rw-r--r--runtime/queries/nix/highlights.scm60
1 files changed, 30 insertions, 30 deletions
diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm
index 4633e178..b55bcf8c 100644
--- a/runtime/queries/nix/highlights.scm
+++ b/runtime/queries/nix/highlights.scm
@@ -1,5 +1,23 @@
(comment) @comment
+[
+ ";"
+ "."
+ ","
+ "="
+ ":"
+ (ellipses)
+] @punctuation.delimiter
+
+[
+ "("
+ ")"
+ "["
+ "]"
+ "{"
+ "}"
+] @punctuation.bracket
+
"assert" @keyword.control.exception
"or" @keyword.operator
"rec" @keyword.control.repeat
@@ -17,6 +35,18 @@
"with"
] @keyword
+(variable_expression name: (identifier) @variable)
+
+(select_expression
+ attrpath: (attrpath attr: (identifier)) @variable.other.member)
+
+(apply_expression
+ function: [
+ (variable_expression name: (identifier) @function)
+ (select_expression
+ attrpath: (attrpath
+ attr: (identifier) @function .))])
+
((identifier) @variable.builtin
(#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$")
(#is-not? local))
@@ -59,28 +89,16 @@
name: (identifier) @variable.parameter
"?"? @punctuation.delimiter)
-(select_expression
- attrpath: (attrpath attr: (identifier)) @variable.other.member)
-
(interpolation
"${" @punctuation.special
"}" @punctuation.special) @embedded
-(apply_expression
- function: [
- (variable_expression name: (identifier) @function)
- (select_expression
- attrpath: (attrpath
- attr: (identifier) @function .))])
-
(unary_expression
operator: _ @operator)
(binary_expression
operator: _ @operator)
-(variable_expression name: (identifier) @variable)
-
(binding
attrpath: (attrpath attr: (identifier)) @variable.other.member)
@@ -92,21 +110,3 @@
"?" @operator
attrpath: (attrpath
attr: (identifier) @variable.other.member))
-
-[
- ";"
- "."
- ","
- "="
- ":"
- (ellipses)
-] @punctuation.delimiter
-
-[
- "("
- ")"
- "["
- "]"
- "{"
- "}"
-] @punctuation.bracket \ No newline at end of file