nvim-treesitter-refactor icon indicating copy to clipboard operation
nvim-treesitter-refactor copied to clipboard

Refactor inside Markdown codeblocks (injections)

Open carrascomj opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Markdown has now a treesitter implementation. This came with language-specific syntax highlighting for the different code blocks in the markdown file. Now, it is even working with textobjects inside code blocks (I believe since https://github.com/nvim-treesitter/nvim-treesitter-textobjects/commit/c4be3a42715dd44ea9465662ad7e3b010f6acf47 but maybe there was further tweaking).

Describe the solution you'd like I would like to have the refactor functionality for code blocks in markdown files too. It would be nice to have at least the highlight_definitions but I am also finding the rename quite useful for markdown files. I guess they should be isolated to the current code block.

Describe alternatives you've considered Alternatively, having global refactor actions (for all code blocks in the same language) would be great too, although it sounds very ambitious.

Additional context My entire treesitter-related config is at https://github.com/carrascomj/dotnvim/blob/master/lua/lv-treesitter/init.lua

carrascomj avatar Dec 29 '21 00:12 carrascomj