[Idea] Add scope information to `Telescope` pickers
It would be great to add a Scope column to any Telescope picker as follows, to show the scope of each listed item:
┌───────────────────────────────────────────────────────┐
│ Previewer │
├───────────────────────────────────────────────────────┤
│ │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ ************************************************* │
│ │
├─────────────────┬────────────────┬────────────────────┤
│ Filepath │ Scope │ Text │
├─────────────────┼────────────────┼────────────────────┤
│ C:\path\file_1 │ A > B > C > │ X │
│ C:\path\file_2 │ A > │ Y │
│ C:\path\file_2 │ D > │ Z │
│ C:\path\file_2 │ E > │ W │
└─────────────────┴────────────────┴────────────────────┘
Filepath:
- Optional display.
- Relative/Absolute etc.
Scope:
- The scope information may come from LSP (if available on the buffer) or tags (if scope information is available).
- May be C++ classes, functions, Markdown sections.
- Display only parent scope or full hierarchy.
- Plugin based? (e.g. nvim-navic).
Text:
- Any kind of searched text (LSP Symbol, visual string, diagnostic, etc.).
Maybe a Telescope extension / action could be developed?
An example of possible action:
telescope.actions.send_to_navic
So that all of the telescope results are formatted as suggested above.
https://github.com/nvim-telescope/telescope.nvim/issues/2740
Not sure I understand the idea here? Are you suggesting something like Navbuddy?
As far as i understand, it's not the same as Navbuddy.
Navbuddy's telescope() command searches symbols in a single scope.
This solution would search symbols in all scopes same as default telescope lsp_document_symbols(), but in addition to symbol name and type would also show the enclosing scope.
I would also like to see the enclosing scope when searching through all symbols.