forked from python/typeshed
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offer sensible default VSCode settings (python#9436)
- Loading branch information
Showing
4 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// ⚠ 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", | ||
], | ||
} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Copy this file as `.vscode/settings.json` to configure VSCode for this workspace. | ||
* Unfortunately, VSCode doesn't (yet) offer any way to have "workspace defaults" or "user-worspace settings", | ||
* so offering defaults to copy is the best we can do at the moment. | ||
* | ||
* ⚠ Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use. | ||
*/ | ||
{ | ||
// Don't format on save for formatters we don't explicitely control | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": false | ||
}, | ||
// Set file associations to support comments syntax highlight | ||
"files.associations": { | ||
"settings.default.json": "jsonc", | ||
"pyrightconfig*.json": "jsonc", | ||
".flake8": "properties", | ||
"stubtest_allowlist*.txt": "properties", | ||
"**/stubtest_allowlists/*.txt": "properties", | ||
"pytype_exclude_list.txt": "properties" | ||
}, | ||
"files.exclude": { | ||
"**/.mypy_cache": true | ||
}, | ||
"files.insertFinalNewline": true, | ||
"files.trimFinalNewlines": true, | ||
"files.trimTrailingWhitespace": true, | ||
"editor.comments.insertSpace": true, | ||
"editor.insertSpaces": true, | ||
"editor.detectIndentation": false, | ||
"editor.tabSize": 2, | ||
"[json][jsonc][python]": { | ||
"editor.tabSize": 4 | ||
}, | ||
"[markdown]": { | ||
"editor.rulers": [ | ||
90, | ||
130 | ||
] | ||
}, | ||
"[git-commit]": { | ||
"editor.rulers": [ | ||
72 | ||
] | ||
}, | ||
"[yaml]": { | ||
"editor.defaultFormatter": "redhat.vscode-yaml", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
} | ||
}, | ||
"[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 | ||
} | ||
}, | ||
"isort.check": true, | ||
// Using the dedicated black extension | ||
"black-formatter.importStrategy": "fromEnvironment", | ||
"python.formatting.provider": "none", | ||
// Important to follow the config in pyrightconfig.json | ||
"python.analysis.useLibraryCodeForTypes": false, | ||
"python.analysis.extraPaths": [ | ||
"tests" | ||
], | ||
"python.linting.enabled": true, | ||
"python.linting.mypyEnabled": true, | ||
"python.linting.mypyArgs": [ | ||
"--show-column-numbers", | ||
"--no-pretty", | ||
"--custom-typeshed-dir=${workspaceFolder}", | ||
"--python-version=3.7" | ||
], | ||
"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 | ||
} |