nvim-treesitter/runtime/queries/perl/injections.scm

19 lines
558 B
Scheme
Raw Permalink Normal View History

; an injections.scm file for nvim-treesitter
((comment) @injection.content
2024-01-06 15:05:50 +09:00
(#set! injection.language "comment"))
((pod) @injection.content
2024-01-06 15:05:50 +09:00
(#set! injection.language "pod"))
((substitution_regexp
(replacement) @injection.content
(substitution_regexp_modifiers) @_modifiers)
2024-01-06 15:05:50 +09:00
; match if there's a single `e` in the modifiers list
(#lua-match? @_modifiers "e")
(#not-lua-match? @_modifiers "e.*e")
(#set! injection.language "perl")
(#set! injection.include-children))
(heredoc_content
(heredoc_end) @injection.language) @injection.content