-
Notifications
You must be signed in to change notification settings - Fork 23
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
Open references if definition result has the same range than clicked offset #531
Comments
in VSCode, when you ctrl + click on a reference, it first sends a textDocument/definition request. If the returned range overlaps with the clicked position, it then sends a textDocument/references request. |
Thanks so much @CppCXY for your information. I see now more the benefit to consume references. @InSyncWithFoo is it the same usecase in the reported issue from your project? |
Yes, that's probably the best behaviour. |
Indeed, but do you think it is the behavior that user would like to have? |
Of course. They want a panel; we should give them a panel. |
Ctrl
+ Clickclicked offset Fixes redhat-developer#531 Signed-off-by: azerr <[email protected]>
@InSyncWithFoo after debugging Java support in IJ, I undertand more how the go to declaration is working. There are 2 means to manage go to declaration:
What do you think about that @InSyncWithFoo : loosing go to definition (but I think PyCharm should work good) but benefit with Show references panel (and for other language the proper hyperlinked). For many language I think using ImplicitReferenceProvider#getImplicitReferences will be very nice,but before doing that I would liketo know your feeling. If you don't want to loose the LSP go to definition, perhaps we should provide an API to know if the language server must use GotoDeclarationHandler or ImplicitReferenceProvider. |
Either seems suboptimal. Hyperlinking is a small problem, so I slightly prefer the first in this "choose your poison" situation. I'm not familiar with these extension points though. Take this comment only at face value. |
Currently Ctrl + Click always send
textDocument/definition
, which might not be ideal when the definition itself is clicked. LSP4IJ integrators should be able to configure that programmatically.(Filed as requested at this issue.)
The text was updated successfully, but these errors were encountered: