cmd+click behavior for Goto Definition and a Document Link #147447
Labels
bug
Issue identified by VS Code Team member as probable bug
editor-symbols
definitions, declarations, references
workbench-link
Link protection in workbench
Hi 👋
While implementing two features for the vscode-terraform extension, we've encountered some unexpected behavior when using cmd+click on a range of text.
Our language server based implementation returns a link via
textDocument/documentLink
and a validtextDocument/definition
for the same text range.Link
In our case, we link to the documentation for a module fetched from a remote source. This works as expected and opens a browser when clicking on the link.
Goto Definition
We implemented goto definition for a module source, which takes a user to the local implementation of a module. This works as expected and opens the local file in a new editor tab.
Combination of both features
Each feature works as expected on its own, either using the context menu / hover or cmd+link on the text range.
When both features are available for a text range, cmd+click will execute goto definition and open the link. This results in a browser window opening the link while VS Code opens the local file in a new editor tab in the background.
Is this the intended behavior? It feels off, and I would expect that one of the features "wins" when using cmd+click while both are still usable via the context menu / hover.
The text was updated successfully, but these errors were encountered: