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.scm | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm index b55bcf8c..4633e178 100644 --- a/runtime/queries/nix/highlights.scm +++ b/runtime/queries/nix/highlights.scm @@ -1,23 +1,5 @@ (comment) @comment -[ - ";" - "." - "," - "=" - ":" - (ellipses) -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - "assert" @keyword.control.exception "or" @keyword.operator "rec" @keyword.control.repeat @@ -35,18 +17,6 @@ "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)) @@ -89,16 +59,28 @@ 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) @@ -110,3 +92,21 @@ "?" @operator attrpath: (attrpath attr: (identifier) @variable.other.member)) + +[ + ";" + "." + "," + "=" + ":" + (ellipses) +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket
\ No newline at end of file |