-
Notifications
You must be signed in to change notification settings - Fork 316
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
Conversation
// 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", |
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.
A few things in mine that are not in yours:
not sure what the big difference would be here, but I found it relevant at some point.
self-descriptive.
makes editing mustache easier. |
I also have |
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": "explicit" | ||
} |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Import sorting works fine for me without this. Doesn't isort
pick up any needed config from pyproject.toml
?
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.
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 pyproject
.
@jonatanschroeder to pick those apart: "editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}, This is covered in the JS/TS language sections already. "eslint.validate": ["javascript", "typescript"], https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint says "This is an old legacy setting and should in normal cases not be necessary anymore". Is there a particular reason you feel this is necessary? "typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always" IMO these are personal preferences, not the foundations of a useful editor experience. "html.format.templating": true, I enabled this but couldn't perceive any differences when editing an HTML files. Can you tell me what I should be looking for here?
Again, I feel these are personal preferences, unless you have an argument for why they should be set by default. |
No reason. I saw them online combined with the eslint fix setting and added them together, so I thought they were both needed, glad to see that's not the case.
I don't have a strong opinion on these are they only affect cases where we rename or move files, so I'm ok with your assessment.
Indeed, this typically affects changing question.html files in my courses, but exampleCourse/testCourse are ignored by prettier in PL, so they won't affect anything here. Feel free to skip.
I'm ok with that assessment. |
Co-authored-by: Jonatan Schroeder <jonatan@yorku.ca>
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.
LGTM
This PR adds an opinionated
.vscode/settings.json
file. Committing this to the repository is by no means optimal, as it makes doing local customization of this config more difficult. However, we feel the benefits of getting a functioning editor out-of-the-box outweigh the downsides. Hopefully the VSCode folks address microsoft/vscode#40233 so we can get the best of both worlds.