1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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")))))