vista.vim
vista.vim copied to clipboard
Support VSCode-style outline view.
Is your feature request related to a problem? Please describe. VSCode provides a reasonably high quality outline view, which I believe is driven by a combination of range-base heuristics https://github.com/Microsoft/language-server-protocol/issues/132, https://github.com/palantir/python-language-server/issues/188 and an explicit hierarchical outline api proposed here https://github.com/microsoft/vscode/issues/34968 and implemented here.
This information appears to come in a passthrough from vim-lsp in some cases. Though vim-lsp marks the document symbols as "unsupported" https://github.com/prabirshrestha/vim-lsp/commit/7ccab31b791b05d5a2bf6df1b19cc667464111a8 there is an older commit showing that the data may still be present https://github.com/prabirshrestha/vim-lsp/commit/f716e565b56f6fc66ed48735bb2958a8ec569333.
Describe the solution you'd like
It would be great if vista.vim provided a basic nested LSP symbol display, based on the "overlapping range" heuristic previously used by lsp document symbol consumers.
As an extension, it would be great if vista.com checked for and potentially consumed the full hierarchical document symbol metadata if provided by the LSP plugin. From the referenced vim-lsp commit above, I believe that this information may already be present from some lsp providers.
Describe alternatives you've considered
Not deeply investigated, it appears that the tree view is already a little problematic from #320? How is the coc tree view implemented?
vista.vim uses the API of coc.nvim to retrieve the data and then render them in tree view. If you are using coc.nvim, the tree view is already done well, what's still missing? I don't have time for these reference links, can you elaborate with some pictures?