-
Notifications
You must be signed in to change notification settings - Fork 318
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
Add .vscode/settings.json #9295
Changes from all commits
5b5fada
a2988c8
07c71cb
793228d
c1d83d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// If the following is ever addressed, we can update our config to use whatever | ||
// the official shared config is: | ||
// https://github.com/microsoft/vscode/issues/40233 | ||
|
||
// This is required to load extensions, which in turn is required to be able | ||
// to format SQL files. | ||
// https://github.com/prettier/prettier-vscode/issues/3235 | ||
"prettier.configPath": "./.prettierrc.json", | ||
|
||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "explicit" | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of the configs I see add an argument to the isort command: https://stackoverflow.com/a/72667901 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Import sorting works fine for me without this. Doesn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are only some cases where black and isort might differ in behavior, but I had the same thought, it might just pick up the config from |
||
}, | ||
|
||
"[javascript][typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
}, | ||
|
||
"[html][css][json][yaml][sql][markdown]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true | ||
} | ||
} |
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.
This was the key to getting SQL files formatting again; there's no need to install a separate extension.
Hopefully prettier/prettier-vscode#3235 gets addressed soon.