CCPatriot
CCPatriot
DDeno
Created by CCPatriot on 11/19/2024 in #help
auto import in VSCode/Zed (general LSP support for auto importing)
Hi all. I'm working with a fresh Deno project in VSCode and can't seem to get import autocompletes to work. All other LSP functionality seems to be working correctly. I have the following deno.json
{
"tasks": {
"dev": "deno run --allow-net main.ts"
},
"imports": {
"@hono/hono": "jsr:@hono/hono@^4.6.10"
}
}
{
"tasks": {
"dev": "deno run --allow-net main.ts"
},
"imports": {
"@hono/hono": "jsr:@hono/hono@^4.6.10"
}
}
If I try to write out Hono, I don't get any prompt to import from @hono/hono. If I manually add the import { Hono } from "@hono/hono"; import, following attemps to write out Hono will at least give me an autocomplete that references the @hono/hono dependency, but nothing will automatically add the import to the file. For what it's worth, I experience the same issues with the LSP in Zed. I also tested with imports from jsr:@oak/oak to see if there was something off with Hono specifically, but experienced the same issues there. It looks like there was some recent work to fix auto-importing specifically for npm libraries, so I'm not sure if perhaps that has impacted things here... Any support is greatly appreciated. Thanks!
8 replies