mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
* feat(python): `@string.regex` capture, injection improvements * fix(python): match regex only for first argument of re module * chore(python): remove unneeded capture Co-authored-by: Santos Gallegos <stsewd@proton.me> * fix(python): only highlight string content itself as regex --------- Co-authored-by: Santos Gallegos <stsewd@proton.me>
10 lines
303 B
Scheme
10 lines
303 B
Scheme
(call
|
|
function: (attribute
|
|
object: (identifier) @_re)
|
|
arguments: (argument_list . (string
|
|
(string_content) @injection.content))
|
|
(#eq? @_re "re")
|
|
(#set! injection.language "regex"))
|
|
|
|
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|