denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.11k stars 5.36k forks source link

Issues with lsp imports #24889

Open ry opened 2 months ago

ry commented 2 months ago

Version: Deno 1.45.5

No quickfix for installing npm dependencies

Screenshot 2024-08-05 at 10 39 41 AM

No auto-complete for node:fs/pro

Screenshot 2024-08-05 at 10 45 42 AM

Use "install" instead of "cache" everywhere. For example - change terminology from "Uncached or missing jsr dependency" to "Uninstalled". Or in the quickfix, instead of "Cache jsr:@std/fs/walk and its dependencies" say "Install jsr:@std/fs/walk and its dependencies"

Screenshot 2024-08-05 at 10 42 10 AM Screenshot 2024-08-05 at 10 42 27 AM

Uncached deps red squiggly should probably be a yellow squiggly. Red is too aggressive. Screenshot 2024-08-05 at 6 05 56 AM

also https://github.com/denoland/deno/issues/24951

lucacasonato commented 2 months ago

I agree with everything here, except:

Uncached deps red squiggly should probably be a yellow squiggly. Red is too aggressive.

It should be a red squiggly - it's the error for when you are importing something that does not exist. import "./doesnotexist.ts" should not be a yellow squiggly either.

guy-borderless commented 2 months ago

May be nice to also be able to deno add and have the name rewritten

ry commented 2 months ago

@lucacasonato

It should be a red squiggly - it's the error for when you are importing something that does not exist. import "./doesnotexist.ts" should not be a yellow squiggly either.

With auto-install common in deno, I don't think this matches the user's experience. jsr:@std/fs/walk does exist, unlike ./doesnotexist.ts. The analogy doesn't hold.

luizfilipe commented 2 months ago

that would be nice to be on LSP, and also with things on "imports" section on deno.json conf