hedyhli / outline.nvim

Code outline sidebar powered by LSP. Significantly enhanced & refactored fork of symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
543 stars 15 forks source link

Feature request: execute action on code via outline (commenting, deleting, yanking) #51

Open gennaro-tedesco opened 6 months ago

gennaro-tedesco commented 6 months ago

This request is probably out of scope and generally complex, so feel free to close or ignore. However, I thought I would mention it in case there are already ways to achieve the same behaviour that you may know of (and suggest).

Description of the feature

Would it be possible to operate on code via action performed in the Outline window? For example: commenting out, deleting, yanking an item in the Outline panel would perform the corresponding action on the entire block of code that the item refers to?

Use case

The case I have at the moment is to comment out/remove single entries of arrays or tables by commenting out/deleting the corresponding item in Outline (often the entries are long functions or any other complex piece of code, so it'd be to perform this action at once by operating on the Outline only rather than having to scroll throughout the entire code and comment out the bits by bits manually).

I know one can perform code actions and rename methods already: do you think it is possible to obtain such a functionality as well?