-
-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Describe the bug
When performing import statement autocomplete on a namespaced package name (i.e. one starting with @) the completed package name ends up with a double @. This only happens in Svelte files, not in JS/TS files.
To Reproduce
Steps to reproduce the behavior:
- Create a project with a namespaced package dependency. SvelteKit works well here since it includes @sveltejs/kit.
- Open a Svelte file and type
import * as p from '@. - Select @sveltejs/kit or any other namespaced package and accept the suggestion.
- Notice that the final line is
import * as kit from '@@sveltejs/kit'with the@doubled up.
This feels like an issue of the @ character just not being treated as part of the "existing text" in the autocomplete.
Expected behavior
Just a single @ character in the package name.
System (please complete the following information):
MacOS 12.01 on M1, VS Code 1.61.2, Svelte for VS Code 105.5.0
But the versions don't matter much. I first noticed this in Neovim on Ubuntu Linux with coc.nvim/coc-svelte a few months ago and assumed it was just a Vim problem until I tried to reproduce it in VSCode today and saw it happens there too.