From 2cf0239d3fd738d9e82909c94b41062c4765c375 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 6 Oct 2025 04:52:05 +0800 Subject: Enhance rust-analyzer configuration for better proc-macro support - Enable procMacro.attributes for attribute macro support - Increase macroExpansion.maxDepth to 32 for complex macro chains - Enable both hir and tt macro expansion engines - Add experimental.procMacro.server for improved macro server support --- rust-analyzer.toml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust-analyzer.toml') diff --git a/rust-analyzer.toml b/rust-analyzer.toml index d108da8..0a09afa 100644 --- a/rust-analyzer.toml +++ b/rust-analyzer.toml @@ -8,6 +8,7 @@ runBuildScripts = true [rust-analyzer] procMacro.enable = true +procMacro.attributes.enable = true diagnostics.disabled = ["unresolved-proc-macro"] @@ -28,6 +29,8 @@ check.extraArgs = ["--all-features"] files.watcher = "client" macroExpansion.mode = "hir" +macroExpansion.maxDepth = 32 +macroExpansion.engines = { hir = true, tt = true } workspace.symbol.search.scope = "workspace" @@ -45,3 +48,4 @@ callInfo.full = true linkedProjects = ["Cargo.toml"] experimental.procAttrMacros = true +experimental.procMacro.server = true -- cgit