Reputation: 424
I'm using Typescript with SvelteKit
When I type something that can be auto imported, as seen in the above GIF, the auto import doesn't keep things at the same indent level. I also need absolute paths:
/src/...
not
src/...
The VS code setting for this is called TypeScript > Suggest: Auto Imports
It's a minor inconvenience but I am a programmer and this is making me work harder than I ought to. /s
Upvotes: 2
Views: 6208
Reputation: 39
In your settings.json
file add the following:
"javascript.preferences.importModuleSpecifier": "relative", "typescript.preferences.importModuleSpecifier": "relative"
Upvotes: 3
Reputation: 577
CTRL+,
)typescript import module specifier
shortest
to relative
ALT+SHIFT+F
to format the entire file which will fix that as well.Upvotes: 9