Skip to content

Commit f0d969b

Browse files
committed
Update vscode-specific settings
Add one recommended extension, and specify auto-formatters
1 parent b77c87b commit f0d969b

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

.vscode/extensions.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
22
"recommendations": [
3+
// Auto-format Python code with Ruff linter
4+
"charliermarsh.ruff",
5+
// To apply settings from .editorconfig file
36
"editorconfig.editorconfig",
7+
// Python intellisense support
48
"ms-python.python",
5-
"ms-python.vscode-pylance"
9+
// Python language server and type checker
10+
"ms-python.vscode-pylance",
611
]
7-
}
12+
}

.vscode/settings.json

+21-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
{
2-
"python.analysis.typeCheckingMode": "basic"
2+
"python.analysis.typeCheckingMode": "basic",
3+
"files.insertFinalNewline": true,
4+
"editor.formatOnSave": true,
5+
"editor.formatOnSaveMode": "modifications",
6+
"[python]": {
7+
"editor.defaultFormatter": "charliermarsh.ruff",
8+
},
9+
"[jsonc]": {
10+
"editor.defaultFormatter": "vscode.json-language-features",
11+
},
12+
"[javascript]": {
13+
"editor.defaultFormatter": "vscode.typescript-language-features",
14+
},
15+
"[css]": {
16+
"editor.defaultFormatter": "vscode.css-language-features",
17+
},
18+
"[html]": {
19+
// Doesn't work properly with template files, for example with things
20+
// like {{ url("page") }} becoming {{ url(" page") }}
21+
"editor.formatOnSave": false,
22+
},
323
}

0 commit comments

Comments
 (0)