nvim-treesitter/queries/python/injections.scm

11 lines
284 B
Scheme
Raw Normal View History

((call
function: (attribute
object: (identifier) @_re)
arguments: (argument_list (string) @injection.content))
(#eq? @_re "re")
(#lua-match? @injection.content "^r.*")
(#set! injection.language "regex"))
((comment) @injection.content
(#set! injection.language "comment"))