1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 09:30:04 +08:00
SpaceVim/bundle/nvim-treesitter/queries/nix/locals.scm
2022-04-14 12:01:23 +08:00

16 lines
525 B
Scheme

; let bindings
(let (bind . (attrpath) @definition.var)) @scope
; rec attrsets
(rec_attrset (bind . (attrpath) @definition.field)) @scope
; functions and parameters
(function . [
(identifier) @definition.parameter
(formals (formal . (identifier) @definition.parameter))
]) @scope
((formals) "@" (identifier) @definition.parameter) ; I couldn't get this to work properly inside the (function)
; some identifiers can't be references, but @reference doesn't seem to have an inverse like @none
(identifier) @reference