Phil
Phil2d ago

No Auto Complete Suggestions for `@/` Alias in Deno with VSCode

Hi,
I’m using Deno with VSCode, and the @/ alias works fine for imports but I don’t get auto complete suggestions for files in my src/ folder. I have to manually type the file paths for it to work. For example this works:
import {} from "@/decorators.ts";
import {} from "@/decorators.ts";
But I had to write decorators.ts manually because no auto complete suggestions were provided. Here’s my deno.json:
{
"imports": {
"@/": "./src/",
"@std/assert": "jsr:@std/assert@1"
}
}
{
"imports": {
"@/": "./src/",
"@std/assert": "jsr:@std/assert@1"
}
}
And my VSCode settings:
{
"deno.enable": true,
"deno.suggest.imports.autoDiscover": true
}
{
"deno.enable": true,
"deno.suggest.imports.autoDiscover": true
}
Any ideas on how to get auto complete working?
3 Replies
lcasdev
lcasdev2d ago
This is not implemented yet unfortunately - you can follow https://github.com/denoland/deno/issues/13621
GitHub
lsp: integrate import map completions and registry completions · Is...
When completing an import map specifier that resolves to a specifier covered by a registry completion, the completions are remapped to the import specifier.
lcasdev
lcasdev2d ago
(and upvote the issue if you'd like to see this)
Phil
Phil2d ago
I would love to upvote it. How do I do that?