Skip to content

Commit 433ecd6

Browse files
committed
feat(lsp): configure rust-analyzer to use a seperate cargo profile
References: rust-lang/rust-analyzer#6007 (comment) Signed-off-by: Fletcher Nichol <[email protected]>
1 parent 53010ce commit 433ecd6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

home/.config/nvim/lua/my/lsp/settings/rust_analyzer.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ local default_opts = {
88
-- Favor `cargo clippy` to `cargo check` for diagnostics
99
command = "clippy",
1010
},
11+
cargo = {
12+
extraEnv = {
13+
["CARGO_PROFILE_RUST_ANALYZER_INHERITS"] = "dev",
14+
},
15+
extraArgs = {
16+
"--profile",
17+
"rust-analyzer",
18+
},
19+
},
1120
},
1221
},
1322
}

0 commit comments

Comments
 (0)