From bbb2b506e8f5ea7aae2b1365a75db9274f860f81 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 6 Oct 2025 02:02:27 +0800 Subject: Add rust-analyzer configuration for enhanced IDE support - Enable proc-macro support for procedural macros - Configure enhanced completion and inlay hints - Enable workspace-wide symbol search - Set up clippy as default check command with all features - Configure linked projects and experimental features --- rust-analyzer.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 rust-analyzer.toml (limited to 'rust-analyzer.toml') diff --git a/rust-analyzer.toml b/rust-analyzer.toml new file mode 100644 index 0000000..d108da8 --- /dev/null +++ b/rust-analyzer.toml @@ -0,0 +1,47 @@ +[package] +proc-macro.enable = true + +[cargo] +allFeatures = true +loadOutDirsFromCheck = true +runBuildScripts = true + +[rust-analyzer] +procMacro.enable = true + +diagnostics.disabled = ["unresolved-proc-macro"] + +inlayHints.typeHints = true +inlayHints.parameterHints = true +inlayHints.chainingHints = true + +completion.autoimport.enable = true +completion.postfix.enable = true + +lens.enable = true +lens.implementations.enable = true +lens.references.enable = true + +check.command = "clippy" +check.extraArgs = ["--all-features"] + +files.watcher = "client" + +macroExpansion.mode = "hir" + +workspace.symbol.search.scope = "workspace" + +assist.importMergeBehavior = "last" +assist.importPrefix = "by_self" + +hover.actions.enable = true +hover.actions.debug.enable = true +hover.actions.gotoTypeDef.enable = true +hover.actions.implementations.enable = true +hover.actions.references.enable = true + +callInfo.full = true + +linkedProjects = ["Cargo.toml"] + +experimental.procAttrMacros = true -- cgit