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

feature: include current reference in list #482

Closed
1 task done
saecki opened this issue Jun 5, 2024 · 1 comment · Fixed by #486
Closed
1 task done

feature: include current reference in list #482

saecki opened this issue Jun 5, 2024 · 1 comment · Fixed by #486
Labels
enhancement New feature or request

Comments

@saecki
Copy link
Contributor

saecki commented Jun 5, 2024

Did you check the docs?

  • I have read all the trouble.nvim docs

Is your feature request related to a problem? Please describe.

When listing references of a function, the current reference isn't included in the list. Especially when it's a call reference and not the definition of the function, I find that to be somewhat irritating.

Describe the solution you'd like

I'd like a configuration option similar to the includeDeclaration parameter that the lsp spec defines. That would also include the one currently under the cursor.

Describe alternatives you've considered

Since the current behavior is hard-coded, I think currently the only alternative would be to use vim.lsp.buf.references() instead of trouble. But the quickfix list offers a way worse user experience compared to trouble.

Additional context

No response

@saecki saecki added the enhancement New feature or request label Jun 5, 2024
@folke folke closed this as completed in 29d19d4 Jun 6, 2024
@folke
Copy link
Owner

folke commented Jun 6, 2024

This is now configurable per mode. Please refer to the update docs.

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

Successfully merging a pull request may close this issue.

2 participants