deno icon indicating copy to clipboard operation
deno copied to clipboard

Issues with lsp imports

Open ry opened this issue 1 year ago • 4 comments

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

ry avatar Aug 05 '24 14:08 ry

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.

lucacasonato avatar Aug 07 '24 09:08 lucacasonato

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

guy-borderless avatar Aug 07 '24 14:08 guy-borderless

@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.

ry avatar Aug 08 '24 13:08 ry

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

luizfilipe avatar Aug 16 '24 18:08 luizfilipe

There is an npm install quick fix when using "nodeModulesDir": "auto", which I think matches reasonable expectations. Let's close this.

nayeemrmn avatar Dec 17 '24 17:12 nayeemrmn