aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-02-10 22:50:24 +0100
committerStephan Seitz <stephan.lauf@yahoo.de>2021-02-12 08:22:34 +0100
commit2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1 (patch)
treed92a6608ae79c62673d0af30599ce6749909f291
parentFix parser config for nix (diff)
downloadnvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar.gz
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar.bz2
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar.lz
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar.xz
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.tar.zst
nvim-treesitter-2e3422df8e8d6618a0a9dbdd5185a1ae85f9ebc1.zip
highlights(nix): fix for alias name of identifier in attrpath
-rw-r--r--queries/nix/highlights.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/queries/nix/highlights.scm b/queries/nix/highlights.scm
index c5c26d33f..38b413fe4 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)