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
LocationLink specifies: originSelectionRange?, targetUri, targetRange and targetSelectionRange?
The issue is that targetRange and originSelectionRange could be in different files
But LocationLink only allows one instance of a uri
For example if the definition of a function is in one file and a reference is in another (ctrl+clicking the ref to jump to the def)
I can only specify the ranges for one file (the definition file)
This leaves vscode to default to the language's wordPattern for originSelectionRange
which gives a bad ctrl+click underline range
(changing the wordPattern is not an option as it is not context aware, and it messes with other features)
Definition in same file: (correct behaviour)
Definition in different file: (wrong behaviour)
I would suggest allowing a location alteration for originSelectionRange and/or targetSelectionRange & targetRange
The text was updated successfully, but these errors were encountered:
The issue is that targetRange and originSelectionRange could be in different files
The originSelectionRange is always relative to the model and position for which the current request is made. E.g go to def is invoked for file A at position X and originSelectionRange must contain X and is (by its definition) in file A
LocationLink
specifies:originSelectionRange?
,targetUri
,targetRange
andtargetSelectionRange?
The issue is that
targetRange
andoriginSelectionRange
could be in different filesBut
LocationLink
only allows one instance of auri
For example if the definition of a function is in one file and a reference is in another (ctrl+clicking the ref to jump to the def)
I can only specify the
ranges
for one file (the definition file)This leaves vscode to default to the language's
wordPattern
fororiginSelectionRange
which gives a bad ctrl+click underline range
(changing the
wordPattern
is not an option as it is not context aware, and it messes with other features)Definition in same file: (correct behaviour)
![image](https://user-images.githubusercontent.com/33529441/189343478-79135f8d-d235-4715-b86e-24431e45cb67.png)
Definition in different file: (wrong behaviour)
![image](https://user-images.githubusercontent.com/33529441/189343520-68a6bc1b-bfaa-44c2-b462-2779a2b79735.png)
I would suggest allowing a
![image](https://user-images.githubusercontent.com/33529441/189344750-b6a0c55b-0bd9-45bf-acad-d6ca80ff2994.png)
location
alteration fororiginSelectionRange
and/ortargetSelectionRange
&targetRange
The text was updated successfully, but these errors were encountered: