Closed WhyNotHugo closed 3 years ago
@WhyNotHugo hi, sorry for the late reply, injections are handled on the nvim-treesitter. The code-block
directive is sphinx specific, that's why I haven't included them in the queries from nvim-treesitter, I do maintain those queries in another repo https://github.com/stsewd/sphinx.nvim#nvim-treesitter (https://github.com/stsewd/sphinx.nvim/blob/feb8ca4b58d27f14b51aad007090ad6c4195fd06/after/queries/rst/injections.scm#L15-L19)
How about merging those queries into nvim-treesitter
?
While they're not rst-standard, I can't image that being a problem. Worst-case scenario, it provides highlighting to someone who's typed that tag in a non-sphinx rst, which seems like a very odd thing to do.
And I can't say I've seen much rst usage that's not being used for sphinx.
Thoughs?
I'm fine having that query upstream
Code blocks in RST don't seem to get highlighted properly, eg:
This sample clearly has some Python code in it. Is support for that something that needs to happen in this tree-sitter, or in the queries in
nvim-treesitter
?