You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This extension is great and allows to explore references both ways, but the cmd+click feature is only enabled in one direction:
When cmd+click is applied on a symbol reference, it jumps directly to its definition, as expected.
When cmd+click is applied on a symbol definition, nothing happens.
Currently, we can still see the references popup by:
either right click > Go to References
or using the shift+F12 shortcut (by default)
Expected User Experience
Since this is the way VS Code behaves with all other languages, it would be great to be able to open the Go to References popup when cmd+clicking on the symbol definition.
This would greatly improve the Developer Experience when navigating TF files.
Proposal
Since the Go to References feature is already implemented in this extension (according to this issue it was introduced in 2021), it would be a matter of "linking" the cmd+click to it.
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
Interesting feature request! Thanks for raising it. I tend to use this in Go all the time.
I'll document my brief research into this below.
When you cmd+click on a symbol reference, the editor fires a textDocument/definition request to the language server. The LS will then respond with a list of locations of definitions (if found).
When you right click > Go to References on a symbol definition, the editor will fire a textDocument/references request to the language server. The LS will then respond with a list of locations (if found).
In the Terraform extension, when you cmd+click on a symbol definition, the editor will fire a textDocument/definition request as usual, but our LS will respond with an Error for "textDocument/definition" (ID 13): [-32098] no reference origin found, because the symbol is not technically a symbol reference.
However, in the Go extension, the Go LS will not respond with an error. Instead it responds with the range of the clicked symbol:
Thank you very much for your response and thorough explanation @dbanck!
Your proposal definitely makes sense to me and I'm happy to help on a PR. I never collaborated on this repo or any VS Code extension, so for now I feel more like waiting for a potential draft, but once it's kicked off, I'm happy to test it, and participate on some parts of the implementation if it can be useful.
Extension Version
v2.32.3
Problem Statement
This extension is great and allows to explore references both ways, but the
cmd+click
feature is only enabled in one direction:cmd+click
is applied on a symbol reference, it jumps directly to its definition, as expected.cmd+click
is applied on a symbol definition, nothing happens.Currently, we can still see the references popup by:
right click > Go to References
shift+F12
shortcut (by default)Expected User Experience
Since this is the way VS Code behaves with all other languages, it would be great to be able to open the
Go to References
popup whencmd+click
ing on the symbol definition.This would greatly improve the Developer Experience when navigating TF files.
Proposal
Since the
Go to References
feature is already implemented in this extension (according to this issue it was introduced in 2021), it would be a matter of "linking" thecmd+click
to it.References
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: