Skip to content

Refactor inside Markdown codeblocks (injections) #28

Open
@carrascomj

Description

@carrascomj

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 nvim-treesitter/nvim-treesitter-textobjects@c4be3a4 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions