bazelbuild / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
231 stars 76 forks source link

fix: Link the full label / file name instead of individual components #382

Closed vogelsgesang closed 2 months ago

vogelsgesang commented 2 months ago

So far, the go_to_definition provider did not provide a originSelectionRange. Hence, VS Code was falling back on its internal tokenization to decide which part of the text to provide the HyperLink for.

For the label "my/package:file.txt", we hence linked my, package, file and txt individually, all pointing to the same file.

With this change, we now instead always provide the link on the full label.