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

Add support to pass includeDeclaration as True for textDocument/references #2244

Closed
EmasXP opened this issue May 3, 2023 · 3 comments · Fixed by #2275
Closed

Add support to pass includeDeclaration as True for textDocument/references #2244

EmasXP opened this issue May 3, 2023 · 3 comments · Fixed by #2275

Comments

@EmasXP
Copy link
Contributor

EmasXP commented May 3, 2023

When searching for references, I would like to include the declarations in the result.

My thinking is that this could be done by adding a include_declaration argument to lsp_symbol_references. The default value should in that case be False.

What do you think?

@jwortmann
Copy link
Member

Sounds like a good idea to me. It seems that the False value has always been hardcoded for this, probably because it's inline with Sublime's built-in "Goto References..." behavior. The new command argument would mean that you need to add your own context menu entry and/or key binding if you want to change this behavior.

An alternative would be to expose this as a new global setting, which would be more user friendly. But new settings mean more maintenance work in the future, and I think that the impact of changing this option would be rather small. So I would say your suggestion is better.

@EmasXP
Copy link
Contributor Author

EmasXP commented May 5, 2023

I can do a PR for this if you want? Disclosure: that would be my first ever PR. I am happy to do it though 🙂

@predragnikolic
Copy link
Member

@EmasXP feel free to open a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants