-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update vscode recommended settings #10314
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
Merged
srittau
merged 1 commit into
python:main
from
Avasam:vscode-recommended-settings-update
Jun 13, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,41 @@ | ||
// ⚠ Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use. | ||
|
||
// Keep in alphabetical order | ||
{ | ||
"recommendations": [ | ||
"bierner.github-markdown-preview", | ||
"bungcip.better-toml", | ||
"editorconfig.editorconfig", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"redhat.vscode-yaml", | ||
], | ||
"unwantedRecommendations": [ | ||
/* | ||
* Don't recommend by default for this workspace | ||
*/ | ||
"christian-kohler.npm-intellisense", | ||
/* | ||
* Must disable in this workspace | ||
* https://github.com/microsoft/vscode/issues/40239 | ||
*/ | ||
// We use black | ||
"ms-python.autopep8", | ||
// Not using pylint | ||
"ms-python.pylint", | ||
// VSCode has implemented an optimized version | ||
"coenraads.bracket-pair-colorizer", | ||
"coenraads.bracket-pair-colorizer-2", | ||
// Obsoleted by Pylance | ||
"ms-pyright.pyright", | ||
], | ||
"recommendations": [ | ||
"bierner.github-markdown-preview", | ||
"editorconfig.editorconfig", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-python.mypy-type-checker", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"tamasfe.even-better-toml", | ||
"redhat.vscode-yaml", | ||
], | ||
"unwantedRecommendations": [ | ||
/* | ||
* Don't recommend by default for this workspace | ||
*/ | ||
"christian-kohler.npm-intellisense", | ||
/* | ||
* Must disable in this workspace | ||
* https://github.com/microsoft/vscode/issues/40239 | ||
*/ | ||
// even-better-toml has format on save | ||
"bungcip.better-toml", | ||
// Don't use two mypy extensions simultaneously | ||
"matangover.mypy", | ||
// We use black | ||
"ms-python.autopep8", | ||
// Not using pylint | ||
"ms-python.pylint", | ||
// Not using Ruff | ||
"charliermarsh.ruff", | ||
// VSCode has implemented an optimized version | ||
"coenraads.bracket-pair-colorizer", | ||
"coenraads.bracket-pair-colorizer-2", | ||
// Obsoleted by Pylance | ||
"ms-pyright.pyright", | ||
], | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* | ||
* ⚠ Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use. | ||
*/ | ||
// TODO: Add charliermarsh.ruff to unrecommended extensions | ||
{ | ||
// Don't format on save for formatters we don't explicitely control | ||
"editor.formatOnSave": false, | ||
|
@@ -33,62 +34,97 @@ | |
"[json][jsonc][python]": { | ||
"editor.tabSize": 4 | ||
}, | ||
"[markdown]": { | ||
"editor.rulers": [ | ||
90, | ||
130 | ||
] | ||
}, | ||
"editor.rulers": [ | ||
90, | ||
130 | ||
], | ||
"[git-commit]": { | ||
"editor.rulers": [ | ||
72 | ||
] | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml", | ||
// Format on save for formatters we explicitely control | ||
"[json][jsonc][yaml][python][toml]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
"source.fixAll": true, | ||
"source.organizeImports": true | ||
} | ||
}, | ||
"[json][jsonc]": { | ||
"editor.defaultFormatter": "vscode.json-language-features" | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml" | ||
}, | ||
"[toml]": { | ||
"editor.rulers": [ | ||
90 | ||
], | ||
"editor.defaultFormatter": "tamasfe.even-better-toml" | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.rulers": [ | ||
130 | ||
], | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.fixAll.unusedImports": true, | ||
"source.fixAll.convertImportFormat": true, | ||
"source.organizeImports": true | ||
} | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"isort.check": true, | ||
// Using the dedicated black extension | ||
"black-formatter.importStrategy": "fromEnvironment", | ||
// Use the new dedicated extensions instead | ||
"python.formatting.provider": "none", | ||
// Important to follow the config in pyrightconfig.json | ||
"python.linting.enabled": false, | ||
"python.linting.mypyEnabled": false, | ||
"python.linting.flake8Enabled": false, | ||
"python.linting.pycodestyleEnabled": false, | ||
"python.linting.prospectorEnabled": false, | ||
"python.linting.pylamaEnabled": false, | ||
"python.linting.pylintEnabled": false, | ||
// Not using bandit | ||
"python.linting.banditEnabled": false, | ||
// python.analysis is Pylance (pyright) configurations | ||
"python.analysis.fixAll": [ | ||
"source.unusedImports" | ||
// Explicitly omiting "source.convertImportFormat", some stubs use relative imports | ||
], | ||
// Important to use `types-*` and flag untyped dependencies. | ||
"python.analysis.useLibraryCodeForTypes": false, | ||
"python.analysis.typeshedPaths": [ | ||
"${workspaceFolder}" | ||
], | ||
"python.analysis.extraPaths": [ | ||
"tests" | ||
], | ||
"python.linting.enabled": true, | ||
"python.linting.mypyEnabled": true, | ||
"python.linting.mypyArgs": [ | ||
"--show-column-numbers", | ||
"--no-pretty", | ||
"mypy-type-checker.importStrategy": "fromEnvironment", | ||
"mypy-type-checker.args": [ | ||
"--custom-typeshed-dir=${workspaceFolder}", | ||
"--python-version=3.7" | ||
"--python-version=3.7", | ||
"--strict" | ||
// Needed because a library stubbed in typeshed won't necessarily be installed inthe dev's environment | ||
// Currentyl broken in dmypy: https://github.com/python/mypy/issues/10709 | ||
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. Pinging python/mypy#10709 for reference |
||
// "--ignore-missing-imports" | ||
], | ||
// Ensure typeshed's configs are used, and not user's VSCode settings | ||
"flake8.args": [ | ||
"--config=.flake8" | ||
], | ||
"flake8.importStrategy": "fromEnvironment", | ||
"isort.check": true, | ||
"isort.importStrategy": "fromEnvironment", | ||
// Not using bandit | ||
"python.linting.banditEnabled": false, | ||
// Using dedicated Flake8 extension | ||
"python.linting.flake8Enabled": false, | ||
"python.linting.pycodestyleEnabled": false, | ||
"python.linting.prospectorEnabled": false, | ||
"python.linting.pylamaEnabled": false, | ||
// Use the new dedicated extensions instead (and we're not using pylint) | ||
"python.linting.pylintEnabled": false | ||
"black-formatter.importStrategy": "fromEnvironment", | ||
"evenBetterToml.formatter.alignComments": false, | ||
"evenBetterToml.formatter.alignEntries": false, | ||
"evenBetterToml.formatter.allowedBlankLines": 1, | ||
"evenBetterToml.formatter.arrayAutoCollapse": true, | ||
"evenBetterToml.formatter.arrayAutoExpand": true, | ||
"evenBetterToml.formatter.arrayTrailingComma": true, | ||
"evenBetterToml.formatter.columnWidth": 90, | ||
"evenBetterToml.formatter.compactArrays": true, | ||
"evenBetterToml.formatter.compactEntries": false, | ||
"evenBetterToml.formatter.compactInlineTables": false, | ||
"evenBetterToml.formatter.indentEntries": false, | ||
"evenBetterToml.formatter.indentTables": false, | ||
"evenBetterToml.formatter.inlineTableExpand": false, | ||
"evenBetterToml.formatter.reorderArrays": true, | ||
"evenBetterToml.formatter.trailingNewline": true, | ||
// We like keeping TOML keys in a certain non-alphabetical order that feels more natural | ||
"evenBetterToml.formatter.reorderKeys": false | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Lots of whitespace changes because apparently last time I didn't "format on save" this file. This respects the configuration in
.editorconfig
and.vscode/settings.json
.