fannheyward / coc-deno

Deno extension for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Buffer for "jumpDefinition" is empty in deno v1.7.5

yaegassy opened this issue · comments

Description

This may be a problem with "deno lsp" itself, but I would like to report it since it is not a problem with v1.7.4.

Also, I'm sorry if the problem is only with my environment.

However, we have confirmed that VSCode's vscode_deno v3.0.1 can "Go to definitions" even with deno v1.7.5.

DEMO

[OK] coc-deno + deno v1.7.4

coc-deno_1_7_4

[NG] coc-deno + deno v1.7.5 (empty buffer)

coc-deno_1_7_5

[OK] vscode_deno v3.0.1 + deno v1.7.5

vscode_deno_3_0_1_deno_1_7_5

Misc

An older version of deno can be downloaded from GitHub release.

https://github.com/denoland/deno/releases

Reproduced.

Additional Information

"deno" seems to be able to download binaries at the "commit hash" level. https://dl.deno.land/

I did some research based on that, and found that this symptom seems to be occurring from this commit. denoland/deno@2225e83

Properly caused by denoland/deno#9514 and denoland/deno@2225e83#diff-4ad030d88c2590103755c58d2eb7fab1c0ed94df17d42b65c51cafb863fb013aR93

In 1.7.4 and earlier LS returns deno:///https/xxx
in 1.7.5 LS returns deno:/https/xxx

Leaves a comment in that issue, but I don't find the stand format in LSP.

Thank you for reporting the issue to deno itself.

I modified the code of "deno" itself and build. https://github.com/denoland/deno/blob/main/cli/lsp/urls.rs#L95

From

format!("deno:/{}", path)

To

format!("deno://{}", path)

two slashes

I was able to jump the definition correctly with "two" slashes

two_slash


I'm not sure if this is an appropriate fix, but I will continue to watch this issue first. denoland/deno#9514 (comment)

Fixed in coc master release neoclide/coc.nvim#2905

I have confirmed that "jumpDefinition" works fine with both deno v1.7.5 and v1.7.4 versions.