stevearc / aerial.nvim

Neovim plugin for a code outline window
MIT License
1.55k stars 76 forks source link

feature request: same method in sub- and/or in super-class; display all the methods of a class including inherited ones #341

Open massimiliano-della-rovere opened 5 months ago

massimiliano-della-rovere commented 5 months ago

Did you check existing requests?

Describe the feature

Provide background

In the outline window and in the sign column, report is a method:

in the sign column,

in the outlinetree something like <C-j> or <C-k> could jump to the method in the sub- or super-class; this implies too that all of the methods of a class should be shown: both inherited ones and the those actually defined in the class, with different color and symbol to distinguish the inherited by the local ones.

What is the significance of this feature?

strongly desired

Additional details

I think this could help: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_prepareTypeHierarchy

stevearc commented 4 months ago

I'm intrigued by the possibility of leveraging the LSP type hierarchy methods for this. It's possible we could do something with that. This would be a challenge because so far the outline view is only showing symbols in the file, and it shows them in the order in which they appear. This constraint has allowed us to make a lot of assumptions for the navigation, code folding, and visualization. If we start to display symbols that are not present in the current file, we'll have to figure out how to keep the behavior consistent.

massimiliano-della-rovere commented 4 months ago

I wish I could help, but I'm really less than a newbie with LSP and Lua :(

MaiLunJiye commented 2 months ago

We can learn from outline.nvim image Left is aerial.nvim and right is outline.nvim.