mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
injections: add more regex injections
This commit is contained in:
parent
5aacb06135
commit
9018fb26cc
5 changed files with 12 additions and 1 deletions
|
|
@ -1 +1,3 @@
|
|||
(comment) @comment
|
||||
|
||||
(regex) @regex
|
||||
|
|
|
|||
|
|
@ -6,3 +6,8 @@
|
|||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment
|
||||
|
||||
((prefixed_string_literal
|
||||
prefix: (identifier) @_prefix) @regex
|
||||
(#eq? @_prefix "r")
|
||||
(#offset! @regex 0 2 0 -1))
|
||||
|
|
|
|||
|
|
@ -166,7 +166,8 @@
|
|||
] @string
|
||||
|
||||
[
|
||||
(regex_pattern_qr)
|
||||
(pattern_matcher)
|
||||
(regex_pattern_qr)
|
||||
(patter_matcher_m)
|
||||
(substitution_pattern_s)
|
||||
] @string.regex
|
||||
|
|
|
|||
1
queries/perl/injections.scm
Normal file
1
queries/perl/injections.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
(comments) @comment
|
||||
|
|
@ -5,3 +5,5 @@
|
|||
(heredoc_end) @language
|
||||
(#set! "language" @language)
|
||||
(#downcase! "language"))
|
||||
|
||||
(regex (string_content) @regex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue