summaryrefslogtreecommitdiff
path: root/vscode
diff options
context:
space:
mode:
Diffstat (limited to 'vscode')
-rw-r--r--vscode/settings.json11
1 files changed, 11 insertions, 0 deletions
diff --git a/vscode/settings.json b/vscode/settings.json
index 3f894f1..87c9cb5 100644
--- a/vscode/settings.json
+++ b/vscode/settings.json
@@ -18,9 +18,20 @@
"rust-analyzer.check.command": "clippy",
"[rust]": {
+ // Indentation: spaces, 4 wide — rustfmt's defaults (hard_tabs = false,
+ // tab_spaces = 4), so what you type matches what format-on-save produces.
+ //
+ // These are stated explicitly rather than left to VS Code's defaults because
+ // detectIndentation is on by default and guesses from the file's existing
+ // content when it opens, which would override insertSpaces and tabSize.
+ "editor.detectIndentation": false,
+ "editor.insertSpaces": true,
+ "editor.tabSize": 4,
+
// Formatting is rustfmt via rust-analyzer; honors rustfmt.toml if present.
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
+
// Applies rust-analyzer's own diagnostic fixes. Fixes originating from
// cargo check/clippy arrive via flycheck and are NOT covered here - those
// still need `cargo fix` / `cargo clippy --fix`.