mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat: add jq
This commit is contained in:
parent
f5c088771b
commit
8a261e32ec
5 changed files with 371 additions and 0 deletions
31
queries/jq/injections.scm
Normal file
31
queries/jq/injections.scm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
(comment) @comment
|
||||
|
||||
; test(val)
|
||||
(query
|
||||
((funcname) @_function
|
||||
(#any-of? @_function
|
||||
"test"
|
||||
"match"
|
||||
"capture"
|
||||
"scan"
|
||||
"split"
|
||||
"splits"
|
||||
"sub"
|
||||
"gsub"))
|
||||
(args . (query (string) @regex)))
|
||||
|
||||
|
||||
; test(regex; flags)
|
||||
(query
|
||||
((funcname) @_function
|
||||
(#any-of? @_function
|
||||
"test"
|
||||
"match"
|
||||
"capture"
|
||||
"scan"
|
||||
"split"
|
||||
"splits"
|
||||
"sub"
|
||||
"gsub"))
|
||||
(args . (args
|
||||
(query (string) @regex))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue