Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea] Add scope information to Telescope pickers #2740

Open
pidgeon777 opened this issue Oct 13, 2023 · 4 comments
Open

[Idea] Add scope information to Telescope pickers #2740

pidgeon777 opened this issue Oct 13, 2023 · 4 comments
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@pidgeon777
Copy link

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.).
@pidgeon777 pidgeon777 added the enhancement Enhancement to performance, inner workings or existent features label Oct 13, 2023
@jamestrew
Copy link
Contributor

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.

@pidgeon777
Copy link
Author

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.

@jamestrew
Copy link
Contributor

Yeah I agree I would probably use it if it existed. Just need someone willing to create it and maintain it 😁

@pidgeon777
Copy link
Author

@jamestrew yes, that's a little detail, eheh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

No branches or pull requests

2 participants