Closed syhol closed 7 months ago
I just got it again with https://deno.land/x/lume@v1.19.0/ so it's not restricted to std.
Specifically the symbol import basePath from "lume/plugins/base_path.ts";
cmd+hovering over the symbol:
cmd+clicking on the symbol
Specifically the symbol import codeHighlight from "lume/plugins/code_highlight.ts";
:
cmd+hovering over the symbol:
cmd+clicking on the symbol
I restarted vscode and it fixed itself. Turns out that's all it needed. Still a bit annoying.
No action on this for about 5 months now so looks like it must have been something wrong with my setup. Closing.
(Edit) Turns out it's not just deno std lib and it's not just the difference between the versions as I've now had the issue with multiple modules inside the https://deno.land/x/lume@v1.19.0/ path.
I can't intentionally recreate this bug in a new environment and I've resolved it on my side, but I wanted to provide you with some data in case anyone runs into it again.
Describe the bug
cmd+click
aka "go to definition" doesn't work as expected for some new symbols I pull into my project. In this case, it was https://deno.land/std@0.203.0.cmd+hovering
over the symbol shows type and docs, butcmd+click
shows me the message:The URL encoding of
%40
instead of@
could be something dodgy.Let me stress, that this issue affected whatever is the latest version of the Deno std lib for me over the last 24 hours:
I managed to resolve the issue by doing the following:
(Edit) See the comment below, it just needed a vscode restart in the end.
~1.
deno cache --reload main.ts
code ./my-project
~~I'm not sure if 1 actually did anything to solve the issue because I did both 1 and 2 at the same time. It might be that the cache reload plus a vscode restart might have fixed it.~
To Reproduce
I can no longer reproduce this issue in a new project, but in the project that was affected I could recreate the issue like this:
Go to definition worked for ServerV0_202_0 but not ServerV0_203_0.
My .vscode/settings.json looked like this:
Expected behavior
The source file should open at the symbol requested.
Screenshots
(Edit) See screenshots in the comment below.
~Unfortunately, I fixed the issue and can no longer recreate it for screenshots but a VS Code error page popped up and said:~
Versions
vscode: v1.82.2 deno: v1.37.0 extension: v3.24.0