mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 14:00:00 -04:00
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
36 lines
760 B
Scheme
36 lines
760 B
Scheme
((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")))))
|