diff --git a/clients/lsp-rust.el b/clients/lsp-rust.el index be8bb6c80a..5ece6c8369 100644 --- a/clients/lsp-rust.el +++ b/clients/lsp-rust.el @@ -409,6 +409,12 @@ The command should include `--message=format=json` or similar option." :group 'lsp-rust-analyzer :package-version '(lsp-mode . "6.2.2")) +(defcustom lsp-rust-analyzer-cargo-unset-test [] + "force rust-analyzer to unset `#[cfg(test)]` for the specified crates." + :type 'lsp-string-vector + :group 'lsp-rust-analyzer + :package-version '(lsp-mode . "6.2.2")) + (defcustom lsp-rust-analyzer-use-client-watching t "Use client watching" :type 'boolean @@ -651,7 +657,8 @@ https://rust-analyzer.github.io/manual.html#auto-import. ; Obsolete, but used by old Rust-Analyzer versions :loadOutDirsFromCheck ,(lsp-json-bool lsp-rust-analyzer-cargo-run-build-scripts) :autoreload ,(lsp-json-bool lsp-rust-analyzer-cargo-auto-reload) - :useRustcWrapperForBuildScripts ,(lsp-json-bool lsp-rust-analyzer-use-rustc-wrapper-for-build-scripts)) + :useRustcWrapperForBuildScripts ,(lsp-json-bool lsp-rust-analyzer-use-rustc-wrapper-for-build-scripts) + :unsetTest ,lsp-rust-analyzer-cargo-unset-test) :rustfmt (:extraArgs ,lsp-rust-analyzer-rustfmt-extra-args :overrideCommand ,lsp-rust-analyzer-rustfmt-override-command) :inlayHints (:typeHints ,(lsp-json-bool lsp-rust-analyzer-server-display-inlay-hints)