Reverse Nix highlights queries

pull/10793/head
postsolar 9 months ago committed by Blaž Hrastnik
parent 132d388444
commit 0364f7c879

@ -17,6 +17,18 @@
"with" "with"
] @keyword ] @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 ((identifier) @variable.builtin
(#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$") (#match? @variable.builtin "^(__currentSystem|__currentTime|__nixPath|__nixVersion|__storeDir|builtins)$")
(#is-not? local)) (#is-not? local))
@ -59,28 +71,16 @@
name: (identifier) @variable.parameter name: (identifier) @variable.parameter
"?"? @punctuation.delimiter) "?"? @punctuation.delimiter)
(select_expression
attrpath: (attrpath attr: (identifier)) @variable.other.member)
(interpolation (interpolation
"${" @punctuation.special "${" @punctuation.special
"}" @punctuation.special) @embedded "}" @punctuation.special) @embedded
(apply_expression
function: [
(variable_expression name: (identifier) @function)
(select_expression
attrpath: (attrpath
attr: (identifier) @function .))])
(unary_expression (unary_expression
operator: _ @operator) operator: _ @operator)
(binary_expression (binary_expression
operator: _ @operator) operator: _ @operator)
(variable_expression name: (identifier) @variable)
(binding (binding
attrpath: (attrpath attr: (identifier)) @variable.other.member) attrpath: (attrpath attr: (identifier)) @variable.other.member)
@ -109,4 +109,4 @@
"]" "]"
"{" "{"
"}" "}"
] @punctuation.bracket ] @punctuation.bracket

Loading…
Cancel
Save