summaryrefslogtreecommitdiff
path: root/vscode
diff options
context:
space:
mode:
authorbatsumaru <>2026-09-23 10:22:10 +0900
committerbatsumaru <>2026-09-23 10:22:10 +0900
commit536b9147885b92c0def298b594af5b0f52795640 (patch)
tree82e46461725fb6aa0284c6cda011a7f5faadbf53 /vscode
Added vscode configs
Diffstat (limited to 'vscode')
-rw-r--r--vscode/settings.json31
1 files changed, 31 insertions, 0 deletions
diff --git a/vscode/settings.json b/vscode/settings.json
new file mode 100644
index 0000000..3f894f1
--- /dev/null
+++ b/vscode/settings.json
@@ -0,0 +1,31 @@
+{
+ // Use the rustup/cargo-installed server rather than the one bundled with
+ // the extension, so it tracks the toolchain.
+ "rust-analyzer.server.path": "~/.cargo/bin/rust-analyzer",
+ "rust-analyzer.restartServerOnConfigChange": true,
+ "rust-analyzer.showSyntaxTree": true,
+ "rust-analyzer.statusBar.showStatusBar": {
+ "documentSelector": [
+ { "language": "rust" },
+ { "pattern": "**/Cargo.toml" },
+ { "pattern": "**/Cargo.lock" },
+ { "scheme": "output", "pattern": "extension-output-rust-lang.rust-analyzer*" }
+ ]
+ },
+
+ // Run clippy instead of plain cargo check on save, so clippy lints appear
+ // as editor diagnostics with quick fixes instead of only on the CLI.
+ "rust-analyzer.check.command": "clippy",
+
+ "[rust]": {
+ // 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`.
+ "editor.codeActionsOnSave": {
+ "source.fixAll.rust-analyzer": "explicit"
+ }
+ }
+}