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

Implement a Sidebar for Variable/Item Occurrences #6

Open
Programmer-RD-AI opened this issue Dec 13, 2024 · 1 comment
Open

Implement a Sidebar for Variable/Item Occurrences #6

Programmer-RD-AI opened this issue Dec 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Programmer-RD-AI
Copy link
Owner

It would be extremely helpful to have a feature that allows users to find all occurrences of a specific variable, function, or keyword and display them in a sidebar or popup. This functionality would significantly enhance code navigation and analysis.

Feature Details:

  • Purpose: Quickly locate all references to a selected variable, function, or keyword within the current file or project.
  • Keybinding Suggestion: Assign a keybinding like <leader>vs (for "variable search") to activate this feature.
  • Sidebar Display: Open a sidebar or floating window listing all occurrences with their context and line numbers.

Expected Features:

  1. Search Scope Options:

    • Current file.
    • Entire project.
  2. Clickable Results:

    • Clicking on an occurrence in the sidebar should jump directly to its location in the file.
  3. Real-Time Updates:

    • Automatically update the sidebar if changes are made to the file or project.
  4. Language-Aware Search:

    • Use nvim-treesitter or LSP for precise and language-aware searching of variables or functions.

Benefits:

  • Greatly improves navigation for debugging or refactoring.
  • Helps track and manage variable/function usage in large codebases.
  • Reduces manual effort in finding references or related items.

Implementation Ideas:

  • Leverage existing plugins like telescope.nvim or trouble.nvim for display and navigation.
  • Use nvim-treesitter or LSP to gather occurrences accurately.

This feature would be an excellent addition to the configuration, making it more powerful and user-friendly. Looking forward to seeing this implemented! 🚀

@Programmer-RD-AI Programmer-RD-AI self-assigned this Dec 13, 2024
Copy link

@Programmer-RD-AI Programmer-RD-AI added the enhancement New feature or request label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant