mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
feat(jq): add locals queries
and highlight function calls
This commit is contained in:
parent
f1fc7c2e76
commit
f9999888eb
2 changed files with 9 additions and 0 deletions
|
|
@ -55,6 +55,8 @@
|
||||||
"foreach"
|
"foreach"
|
||||||
] @function.builtin
|
] @function.builtin
|
||||||
|
|
||||||
|
((funcname) @function.call . "(")
|
||||||
|
|
||||||
; jq -n 'builtins | map(split("/")[0]) | unique | .[]'
|
; jq -n 'builtins | map(split("/")[0]) | unique | .[]'
|
||||||
((funcname) @function.builtin
|
((funcname) @function.builtin
|
||||||
(#any-of? @function.builtin
|
(#any-of? @function.builtin
|
||||||
|
|
|
||||||
7
queries/jq/locals.scm
Normal file
7
queries/jq/locals.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
(funcdef (identifier) @definition.function)
|
||||||
|
|
||||||
|
(funcdefargs (identifier) @definition.parameter)
|
||||||
|
|
||||||
|
(funcname) @reference
|
||||||
|
|
||||||
|
(index (identifier) @reference)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue