From 2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1 Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Wed, 10 Feb 2021 22:50:24 +0100 Subject: highlights(nix): fix for alias name of identifier in attrpath --- queries/nix/highlights.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm index c5c26d33..38b413fe 100644 --- a/queries/nix/highlights.scm +++ b/queries/nix/highlights.scm @@ -64,7 +64,7 @@ ((identifier) @_i (#match? @_i "^(builtins|baseNameOf|dirOf|fetchTarball|map|removeAttrs|toString)$")) @variable.builtin ; display entire builtins path as builtin (ex. `builtins.filter` is highlighted as one long builtin) -(select ((identifier) @_i (#eq? @_i "builtins")) (attrpath (identifier) @variable.builtin)) @variable.builtin +(select ((identifier) @_i (#eq? @_i "builtins")) (attrpath (attr_identifier) @variable.builtin)) @variable.builtin ; import ((identifier) @_i (#eq? @_i "import")) @include @@ -82,8 +82,8 @@ (interpolation "${" @punctuation.special (_) "}" @punctuation.special) @none ; fields (the `.` in `a.b = c;` isn't included) -(attrset (bind . (attrpath (identifier) @field))) -(rec_attrset (bind . (attrpath (identifier) @field))) +(attrset (bind . (attrpath (attr_identifier) @field))) +(rec_attrset (bind . (attrpath (attr_identifier) @field))) ; unary operators (unary "-" @operator) -- cgit v1.2.3