Closed MattSPalmer closed 3 years ago
Sure, we will add support for call hierarchies, we need create a module for tree view at first.
Last year I made a module for tree view (pure VimL), you can copy it if you think it is useful (it is MIT licensed). I would love to see call hierarchies supported directly in coc.nvim.
https://github.com/lambdalisue/fern.vim is a general purpose tree viewer, but in beta stage.
It's asynchronous and pure vimscript too. I too vote for fern. I beg to not reinvent the wheel like you did with coc-lists.
It's bad idea to bind it with other vim plugin for some feature to work.
Sure, we will add support for call hierarchies, we need create a module for tree view at first.
Sorry then, I got the quoted part that you want exactly that.
It's bad idea to bind it with other vim plugin for some feature to work.
You can copy and reuse the source I linked to implement your internal view module, if you think it can save some work. No external dependency. A copy of that code in used also inside vim-lsp to visualise hierarchies here.
It's asynchronous and pure vimscript too. I too vote for fern. I beg to not reinvent the wheel like you did with coc-lists.
So it is the code I linked, with the difference that mine is not in alpha stage (it's used in production in two vim plugins) and it is completely standalone, it does not use Vital.
Having support for this would be great. I know in coc-metals we ended up building this in from scratch to account for the Metals Tree View Protocol
look forward to using this feature too, pls support it
Me too!
yes really need call hierarchy thank you
I'm also interested in a call tree viewer, too.
Is your feature request related to a problem? Please describe.
No problem other than tracking feature parity with tsserver (here is the companion issue for coc-tsserver) and VSCode.
Describe the solution you'd like
Support for retrieving call hierarchies in tree form for named callables.
I believe the minimal required UI would be list-based, similar to the 'outline' list. It could take a "max depth" argument to control the indentation.
Actions on list items might include:
Describe alternatives you've considered
I think you could do this with existing LSP features in a coc extension, but without language-server-level support there would likely be a problem with N+1 queries.
Additional context
I'm not sure which API the project's maintainers prioritize, that of VSCode, Microsoft's LSP spec, or both. So I'm likewise unsure how important it is that as of this writing, the proposal issue has yet to be adopted by Microsoft, though the latest release of VSCode supports it.