Description
Godot version
v4.4.1.stable.official [49a5bc7b6]
VS Code version
1.98.2
Godot Tools VS Code extension version
2.5.1
System information
Windows 11
Issue description
Currently, Godot's LSP does not return the correct file path for uid://
resource scheme when the textDocument/documentLink
command is called.
This results in the following error when trying to follow a reference to a uid://
resource.
This also means that the hover preview does not work for uid://
preloads.
To fix this, i have created a fork with a proof of concept fix. This currently only works for GDScripts resource type since they have an easily distinguishable accompanying *.uid
file, linked below:
With the changes on this fork, hovers over uid://
strings on supported files works as expected (only for GDScript resources). ctrl+click
ing uid://
strings also now works as expected.
This fix works by overriding the return from textDocument/documentLink
calls and stripping target links that starts with uid://
, and instead relying on the internal DocumentLinkProvider
implementation instead.