mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
These injections lead to inconsistent highlighting since some edge cases
aren't handled (as mentioned in the PR description that introduced the
injections [0]). Besides, not all Python projects use reStructuredText
syntax in docstrings.
If someone still wants to use them, they can extend the base injection
queries through `after/queries/` [1] or enable them with
`vim.treesitter.set_query`.
See also: https://github.com/nvim-treesitter/nvim-treesitter/pull/1204
[0]: https://github.com/nvim-treesitter/nvim-treesitter/pull/917
[1]: ad69e2528a (adding-queries)
8 lines
174 B
Scheme
8 lines
174 B
Scheme
((call
|
|
function: (attribute
|
|
object: (identifier) @_re)
|
|
arguments: (argument_list (string) @regex))
|
|
(#eq? @_re "re")
|
|
(#lua-match? @regex "^r.*"))
|
|
|
|
(comment) @comment
|