nvim-treesitter/queries/perl/injections.scm
Veesh Goldman f09a2215b8
* feat(perl): highlight hash keys as @variable.member in various contexts
also, injections for s///e should fully re-parse
2025-03-19 09:48:48 +01:00

15 lines
484 B
Scheme

; an injections.scm file for nvim-treesitter
((comment) @injection.content
(#set! injection.language "comment"))
((pod) @injection.content
(#set! injection.language "pod"))
((substitution_regexp
(replacement) @injection.content
(substitution_regexp_modifiers) @_modifiers)
; 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))