-
Notifications
You must be signed in to change notification settings - Fork 32.8k
DefinitionLink targetSelectionRange not working as expected #58649
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
Comments
(Experimental duplicate detection) |
I believe this happened with 0a1b3a5 |
Not a regression; we just never hooked anything up to use I believe |
Even though that makes sense, I'm not sure I like the idea of using the I would ask that after making this change, you implement |
@mjbvz any plans when this will be addressed. I want to hook this up in LSP and document this correctly. So I will for now convert targetSelectionRange to targetRange on the API side to have a decent behaviour. The other question is why |
@jrieken Trying to validate that, I now see that the targetSelectionRange is what is highlighted in the peek view and is used as the range to navigate to. Is that the expected behaviour? Can the spec be clarified? |
Yeah, that's actually not yet used. The point is to use target selection range when given. The idea of the target range is that we can use it for the preview hover when cmd+hovering over a declaration link. |
Adding |
Issue Type: Bug
Scenario 1:
DefinitionLink
provided withtargetSelectionRange
defined.DefinitionLink.targetRange
is used for highlighting.Scenario 2:
DefinitionLink
provided withtargetSelectionRange
defined.DefinitionLink.targetRange
I am assuming that in at least one of the above scenarios,
DefinitionLink.targetSelectionRange
should be used instead ofDefinitionLink.targetRange
. It is not clear based on the documentation, so I am not sure in what caseDefinitionLink.targetSelectionRange
is supposed to be used, but I figure it must be used for something. I am expecting it to work similarly toDocumentSymbol.selectionRange
.VS Code version: Code 1.27.2 (f46c4c4, 2018-09-12T16:17:45.060Z)
OS version: Windows_NT x64 10.0.17134
The text was updated successfully, but these errors were encountered: