summaryrefslogtreecommitdiff
path: root/rust-analyzer.toml
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-10-06 02:02:27 +0800
committer魏曹先生 <1992414357@qq.com>2025-10-06 02:02:27 +0800
commitbbb2b506e8f5ea7aae2b1365a75db9274f860f81 (patch)
tree3d2e506b32ca7cb32729f04a91304803e8ed3326 /rust-analyzer.toml
parent090dd9310a8b8465b6ca396aa08ec14352634ca0 (diff)
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
Diffstat (limited to 'rust-analyzer.toml')
-rw-r--r--rust-analyzer.toml47
1 files changed, 47 insertions, 0 deletions
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