diff --git a/.vscode/extensions.json b/.vscode/extensions.json index ed738c309..d34a26fbd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,12 @@ { "recommendations": [ + // Auto-format Python code with Ruff linter + "charliermarsh.ruff", + // To apply settings from .editorconfig file "editorconfig.editorconfig", + // Python intellisense support "ms-python.python", - "ms-python.vscode-pylance" + // Python language server and type checker + "ms-python.vscode-pylance", ] - } +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 12901f99f..23bb0e019 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,23 @@ { - "python.analysis.typeCheckingMode": "basic" + "python.analysis.typeCheckingMode": "basic", + "files.insertFinalNewline": true, + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "modifications", + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features", + }, + "[javascript]": { + "editor.defaultFormatter": "vscode.typescript-language-features", + }, + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features", + }, + "[html]": { + // Doesn't work properly with template files, for example with things + // like {{ url("page") }} becoming {{ url(" page") }} + "editor.formatOnSave": false, + }, }