Skip to content

Commit dc75f2a

Browse files
lsp-rust: fix definition of lsp-rust-analyzer-cargo-extra-env (#4768) (#4787)
In rust-analyzer, cargo.extraEnv has been a map since its introduction (rust-lang/rust-analyzer@c407cc5). The definition in lsp-mode hasn't matched since then, but the mismatch has been silently ignored. From rust-lang/rust-analyzer@46ce474, rust-analyzer started showing a warning message on configuration error which we are seeing. With this change, the definition for cargo.extraEnv should match and the warning message is not displayed.
1 parent df11f28 commit dc75f2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clients/lsp-rust.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,10 +851,10 @@ or JSON objects in `rust-project.json` format."
851851
:group 'lsp-rust-analyzer
852852
:package-version '(lsp-mode . "9.0.0"))
853853

854-
(defcustom lsp-rust-analyzer-cargo-extra-env []
854+
(defcustom lsp-rust-analyzer-cargo-extra-env #s(hash-table)
855855
"Extra environment variables that will be set when running cargo, rustc or
856856
other commands within the workspace. Useful for setting RUSTFLAGS."
857-
:type 'lsp-string-vector
857+
:type 'alist
858858
:group 'lsp-rust-analyzer
859859
:package-version '(lsp-mode . "9.0.0"))
860860

0 commit comments

Comments
 (0)