[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.).
Personally, I don't love the idea of having this in telescope core and would rather rely on telescope extensions to do more specialized pickers.
Yes, probably this should fit better as a telescope extension / plugin.
I asked nvim-navic author what he may think about it.
Anyway, it should be very useful to me.
Yeah I agree I would probably use it if it existed. Just need someone willing to create it and maintain it :grin:
@jamestrew yes, that's a little detail, eheh.