-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lsp: does not honor "typescript.preferences.quoteStyle" when adding imports #15487
Comments
I still hit this every single day - perhaps someone could point me to the spot where these imports are generated in the extension? I'm new to vscode extension development |
This is non-trivial to implement, which is why it has been sort of sitting there for a long time. The things that would need to be done:
The whole config to TypeScript language server "user preferences" is fairly complex, but once done it would unlock a lot of other things when the TypeScript language server provides code completions. One of the reasons it has been been a lower priority too is the prevalence of auto-formatter, either the one built in to Deno or prettier, which then reformats on save in an opinionated way. |
Hello, |
This issue should stay open until support is implemented since that's precisely what has been asked, which I'm in favor of, otherwise it means that every project requires a Thanks |
The The |
I'm sorry it's not really okay because we're asking for the ability to globally set the preference while that solution requires to be applied to every single individual project. |
I see what @nayeemrmn means, but I think in the scenario where deno.json doesn't exist, or fmt key isn't specified, the plugin should respect |
Okay we can consider passing through these options when there's no |
Hmm it looks like the |
thanks! |
If the user sets their preferred quote style (say to single quoting), the deno extension does not honor it when adding new imports.
To Reproduce
"typescript.preferences.quoteStyle": "single"
)Notice the new import is added with the default double quotes
i.e.
import { Foo } from "./whatever.ts";
Expected behavior
The new import should be added with single quotes
i.e.
import { Foo } from './whatever.ts';
Versions
vscode: 1.58 deno: 1.12.2 extension: 3.7.0
The text was updated successfully, but these errors were encountered: