Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/jq/injections.scm')
| -rw-r--r-- | runtime/queries/jq/injections.scm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/runtime/queries/jq/injections.scm b/runtime/queries/jq/injections.scm new file mode 100644 index 00000000..ddfe53c3 --- /dev/null +++ b/runtime/queries/jq/injections.scm @@ -0,0 +1,25 @@ +;; From nvim-treesitter, contributed by @ObserverOfTime et al. + +((comment) @injection.content + (#set! injection.language "comment")) + +; test(val) +(query + ((funcname) @_function + (#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub")) + (args + . + (query + (string) @injection.content + (#set! injection.language "regex")))) + +; test(regex; flags) +(query + ((funcname) @_function + (#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub")) + (args + . + (args + (query + (string) @injection.content + (#set! injection.language "regex"))))) |