feat(jq): add locals queries

and highlight function calls
This commit is contained in:
ObserverOfTime 2023-11-10 13:43:26 +02:00 committed by Amaan Qureshi
parent f1fc7c2e76
commit f9999888eb
2 changed files with 9 additions and 0 deletions

View file

@ -55,6 +55,8 @@
"foreach"
] @function.builtin
((funcname) @function.call . "(")
; jq -n 'builtins | map(split("/")[0]) | unique | .[]'
((funcname) @function.builtin
(#any-of? @function.builtin

7
queries/jq/locals.scm Normal file
View file

@ -0,0 +1,7 @@
(funcdef (identifier) @definition.function)
(funcdefargs (identifier) @definition.parameter)
(funcname) @reference
(index (identifier) @reference)