Closed Hubro closed 2 years ago
I'm not sure if this is quite what you want/as configurable as you want, but does the existing current enclosing function feature approximate breadcrumbs? https://github.com/nvim-lua/lsp-status.nvim/blob/master/doc/lsp-status.txt#L104
It would approximate it well in cases where you're not editing a nested function or structure :smile:
However what I'm hoping for is something like the breadcrumbs path in VSCode:
I've found a good alternative based on tree-sitter here: https://github.com/SmiteshP/nvim-gps
But it requires Tree-sitter support for the language, and it needs a custom query file written for each language.
If it was possible to build breadcrumbs from information from an LSP, that would be a great alternative for languages that have a language server, but don't yet have a tree-sitter grammar. I'm increasingly getting the sense that LSP doesn't provide enough information to do this, though.
Yeah, I'm afraid that might be out of scope for this plugin (though I'd be open to reviewing/guiding a PR). I'm not sure that we can easily get more location information than we already display. I will note that "current function" should really be renamed "current scope" - we select a broader set of symbols than just functions (https://github.com/nvim-lua/lsp-status.nvim/blob/master/lua/lsp-status/current_function.lua#L13).
It would approximate it well in cases where you're not editing a nested function or structure 😄
However what I'm hoping for is something like the breadcrumbs path in VSCode:
...
I've found a good alternative based on tree-sitter here: https://github.com/SmiteshP/nvim-gps
But it requires Tree-sitter support for the language, and it needs a custom query file written for each language.
If it was possible to build breadcrumbs from information from an LSP, that would be a great alternative for languages that have a language server, but don't yet have a tree-sitter grammar. I'm increasingly getting the sense that LSP doesn't provide enough information to do this, though.
followed this recommendation to https://github.com/SmiteshP/nvim-navic (and it delivers <3 )
One thing I really miss from VSCode is seeing where I'm at in a document as a "breadcrumbs" path, like:
Is that something that could be integrated into this plugin?
Perhaps like:
It should probably be configurable with separator and which symbol types to include in the path: