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 | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/runtime/queries/nix/highlights.scm b/runtime/queries/nix/highlights.scm index b55bcf8c..ce8e3c1a 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)) @@ -77,10 +47,8 @@ (float_expression) @constant.numeric.float (escape_sequence) @constant.character.escape -(dollar_escape) @constant.character.escape (function_expression - "@"? @punctuation.delimiter universal: (identifier) @variable.parameter "@"? @punctuation.delimiter ) @@ -89,24 +57,51 @@ 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) -(inherit_from attrs: (inherited_attrs attr: (identifier) @variable.other.member)) -(inherited_attrs attr: (identifier) @variable) +(inherit_from attrs: (inherited_attrs attr: (identifier) @variable)) (has_attr_expression expression: (_) "?" @operator attrpath: (attrpath attr: (identifier) @variable.other.member)) + +[ + ";" + "." + "," + "=" +] @punctuation.delimiter + +[ + "(" + ")" + "[" + "]" + "{" + "}" +] @punctuation.bracket
\ No newline at end of file |