-
-
Notifications
You must be signed in to change notification settings - Fork 223
(feat) ts import user preferences #681
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
Conversation
…nto ts-user-preferences
it update according initial code rather than preference
|
Nice feature! But I think it would be better if we would reuse the vscode settings for js/ts. After all, js/ts is embedded into the Svelte script blog so for me it makes sense to reuse its settings, too, then. What do you think? |
|
That would also be ok. It's just there are separate settings for ts and js. Which one should we use? if both who take priority? |
|
Why vscode, whyyyyy 😄 if we got access to the document we also got access to whether or not it's lang=ts, so we could branch on that. |
packages/language-server/src/plugins/typescript/TypeScriptPlugin.ts
Outdated
Show resolved
Hide resolved
|
Since it's using ts/js preferences config of vscode now, should we also check |
|
Where would we check it? |
|
it's also a preference config in vscode |
|
And where would we use it? Since it's part of the |
|
I added it. The config name of vscode is different from the |
Add the ability to config import user preference:
importModuleSpecifierPreferenceandimportModuleSpecifierEnding.The former is shortened to
importModuleSpecifierin the config to make it consistent with vscode's "javascript.preferences.importModuleSpecifier" setting.Auto-import can now be configured to always use path alias (
importModuleSpecifierPreference: 'non-relative') like thisThe default behavior is to use the shorter path, for example:
in this case, it would use relative.