-
Notifications
You must be signed in to change notification settings - Fork 146
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
feat: add default formatter question on initialize #790
base: main
Are you sure you want to change the base?
Conversation
fix Deno.fmt seems not to be executing by default denoland#789 Signed-off-by: Lucas Santos <[email protected]>
Signed-off-by: Lucas Santos <[email protected]>
client/src/commands.ts
Outdated
@@ -78,6 +78,7 @@ export function initializeWorkspace( | |||
try { | |||
const settings = await pickInitWorkspace(); | |||
const config = vscode.workspace.getConfiguration(EXTENSION_NS); | |||
const languageSpecificConfigs = await Promise.all(["typescript", "typescriptreact"].map(async (languageId) => vscode.workspace.getConfiguration("", { languageId }))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Did this because, since language specifics are not namespaced by the extension settings, we couldn't really rely on the other variable since it would return nothing. So I added it as an array in case we need to add more support (JS, JSX) in the future, so this would be very easy to do.
Also, in case we need to change any other language-specific configs in the future we just need to iterate through it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @khaosdoctor, I modified it a bit. Fresh started adding these settings by default in denoland/fresh#1431 so I think it totally makes sense to add it.
@dsherret are you fine with this PR?
Yay! Thanks for merging! |
This is a proposed solution to #789.
fixes #789