From 2b006b8f5efdbd0fb9c93d2587761f7d09544a89 Mon Sep 17 00:00:00 2001 From: AkashiCoin Date: Sat, 7 Sep 2024 17:11:01 +0800 Subject: [PATCH] =?UTF-8?q?:wrench:=20VSCode=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 709f2561..a4cbc10c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,5 +28,31 @@ "python.analysis.autoImportCompletions": true, "python.testing.pytestArgs": ["tests"], "python.testing.unittestEnabled": false, - "python.testing.pytestEnabled": true + "python.testing.pytestEnabled": true, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", // 默认使用 Ruff 格式化 + "editor.wordBasedSuggestions": "allDocuments", + "editor.formatOnType": true, + "editor.formatOnSave": true, // 保存时自动格式化 + "editor.codeActionsOnSave": { + "source.fixAll.ruff": "explicit", + "source.organizeImports": "explicit" + } + }, + "ruff.format.preview": false, + "isort.check": true, + "ruff.importStrategy": "useBundled", + "ruff.organizeImports": false, + "[javascript]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "[json]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "[yaml]": { + "editor.defaultFormatter": "ms-python.black-formatter" + }, + "[markdown]": { + "editor.defaultFormatter": "ms-python.black-formatter" + } }