Add default workspace recommendations for vscode (#1130)
Add default workspace recommendations for working on the YAPF project when using VSCode.
This picks up @EeyoreLee's https://marketplace.visualstudio.com/items?itemName=eeyore.yapf as YAPF support is being dropped by VSCode's built-in python extension.
This also uses @dangmai's https://marketplace.visualstudio.com/items?itemName=dangmai.workspace-default-settings to avoid messing with contributor's personal changes to settings.json.
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..f3f2fe8
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,15 @@
+{
+ "recommendations": [
+ "eeyore.yapf",
+ "dangmai.workspace-default-settings",
+ "ms-python.flake8",
+ "ms-python.isort",
+ "ms-python.python",
+ ],
+ // These are remarked as extenstions you should disable for this workspace.
+ // VSCode does not support disabling extensions via workspace config files.
+ "unwantedRecommendations": [
+ "ms-python.black-formatter",
+ "ms-python.pylint"
+ ]
+}
diff --git a/.vscode/settings.default.json b/.vscode/settings.default.json
new file mode 100644
index 0000000..002dd29
--- /dev/null
+++ b/.vscode/settings.default.json
@@ -0,0 +1,30 @@
+{
+ "editor.codeActionsOnSave": {
+ "source.organizeImports": true
+ },
+ "files.insertFinalNewline": true,
+ "files.trimFinalNewlines": true,
+ "[python]": {
+ "diffEditor.ignoreTrimWhitespace": false,
+ "editor.defaultFormatter": "eeyore.yapf",
+ "editor.formatOnSaveMode": "file",
+ "editor.formatOnSave": true,
+ "editor.wordBasedSuggestions": false,
+ "files.trimTrailingWhitespace": true,
+ },
+ "python.analysis.typeCheckingMode": "basic",
+ "python.languageServer": "Pylance",
+ "files.exclude": {
+ "**/*$py.class": true
+ },
+ "json.schemas": [
+ {
+ "fileMatch": [
+ "/.vscode/settings.default.json"
+ ],
+ "url": "vscode://schemas/settings/folder"
+ }
+ ],
+ "workspace-default-settings.runOnActivation": true,
+ "workspace-default-settings.jsonIndentation": 4
+}