-
Notifications
You must be signed in to change notification settings - Fork 331
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
[VSCODE] developer environment update on settings #9817
base: main
Are you sure you want to change the base?
Changes from all commits
0f942e6
7f56de1
b81fd59
9cf2ed7
d1d68f4
0e01383
d9e4ed5
84e40b3
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 |
---|---|---|
|
@@ -9,12 +9,44 @@ | |
"[html]": { | ||
"editor.formatOnSave": false | ||
}, | ||
"[ejs]": { | ||
"editor.formatOnSave": false | ||
}, | ||
"[lua]": { | ||
"editor.defaultFormatter": "sumneko.lua", | ||
"editor.formatOnSave": false | ||
}, | ||
cderv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"[julia]": { | ||
"editor.formatOnSave": false, | ||
"editor.wordBasedSuggestions": "off", | ||
"editor.defaultFormatter": "julialang.language-julia", | ||
"editor.wordSeparators": "`~#$%^&*()-=+[{]}\\|;:'\",.<>/?" | ||
}, | ||
"[python]": { | ||
"diffEditor.ignoreTrimWhitespace": false, | ||
"gitlens.codeLens.symbolScopes": ["!Module"], | ||
"editor.formatOnSave": false, | ||
"editor.formatOnType": false, | ||
"editor.wordBasedSuggestions": "off", | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
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. I found we could use Black formatter for Python from VSCODE doc: https://code.visualstudio.com/docs/python/formatting#_choose-a-formatter The extension is this one: Again if we do this, next time we'll update some .py file, there will be some style change. So if we choose to do this, I can't make a PR only with style change to anticipate 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. It seems Ruff could be a good option too: https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff Community based, but it seems a wide used formatter now (see #python discussion on slack) 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. You might also want to add/use 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. FYI, when working with Python, I am using: Pylance, isort, and Black Formatter. |
||
}, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
"deno.enable": true, | ||
"deno.lint": true, | ||
"deno.unstable": true, | ||
"deno.importMap": "./src/import_map.json", | ||
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. This is the settings we use, but it is overwriting the other one. Is the value ok ? I believe so. |
||
"deno.suggest.imports.hosts": { | ||
"https://deno.land": true, | ||
"https://den.o.land": false | ||
}, | ||
"deno.inlayHints.enumMemberValues.enabled": false, | ||
"deno.inlayHints.functionLikeReturnTypes.enabled": false, | ||
"deno.inlayHints.parameterNames.enabled": "none", | ||
"deno.inlayHints.parameterTypes.enabled": false, | ||
"deno.inlayHints.propertyDeclarationTypes.enabled": false, | ||
"deno.inlayHints.variableTypes.enabled": false, | ||
"deno.inlayHints.variableTypes.suppressWhenTypeMatchesName": false, | ||
"deno.disablePaths": ["tests/integration/playwright/"] | ||
} |
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.
Among all our language, we usually set
editor.formatOnSave: false
, also because we opt in to true as a default (see lower in config file) https://github.com/quarto-dev/quarto-cli/pull/9817/files#diff-a5de3e5871ffcc383a2294845bd3df25d3eeff6c29ad46e3a396577c413bf357R30This means our file are never auto formatted for some languages, but this can be trigger using Command pallet in VSCODE. For all others, it will be formatted using prettier.
I believe we did opt-out because prettier does not support everything, and some files where not style at first. Meaning if we set to true now, we will have a lot of style change, but better future I would say :)
If we want to enforce the same formatting for every files, and every language, we would activate this settings. Probably lots of style commits to do (in one big PR or over time), but this would ensure same style everywhere for everyone.
Currently, I left the config to false. This includes Lua. Currently, I don't think we use automatically the formatting feature from the Lua extension we use.