mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 18:00:07 -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
|
(comment) @comment
|
||||||
|
|
||||||
|
(regex) @regex
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,8 @@
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
] @comment
|
] @comment
|
||||||
|
|
||||||
|
((prefixed_string_literal
|
||||||
|
prefix: (identifier) @_prefix) @regex
|
||||||
|
(#eq? @_prefix "r")
|
||||||
|
(#offset! @regex 0 2 0 -1))
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,7 @@
|
||||||
] @string
|
] @string
|
||||||
|
|
||||||
[
|
[
|
||||||
|
(pattern_matcher)
|
||||||
(regex_pattern_qr)
|
(regex_pattern_qr)
|
||||||
(patter_matcher_m)
|
(patter_matcher_m)
|
||||||
(substitution_pattern_s)
|
(substitution_pattern_s)
|
||||||
|
|
|
||||||
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
|
(heredoc_end) @language
|
||||||
(#set! "language" @language)
|
(#set! "language" @language)
|
||||||
(#downcase! "language"))
|
(#downcase! "language"))
|
||||||
|
|
||||||
|
(regex (string_content) @regex)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue