Skip to content

Commit

Permalink
feat: add flag for rust-analyzer.cfg.setTest
Browse files Browse the repository at this point in the history
  • Loading branch information
st1971 committed Oct 31, 2024
1 parent 9b10410 commit 76e3039
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clients/lsp-rust.el
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@ which overrides any value that would otherwise be inherited from
:group 'lsp-rust-analyzer
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-rust-analyzer-cfg-set-test t
"force rust-analyzer to set `#[cfg(test)]` for the current crate / workspace."
:type 'boolean
:group 'lsp-rust-analyzer
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-rust-analyzer-use-client-watching t
"Use client watching"
:type 'boolean
Expand Down Expand Up @@ -1698,6 +1704,7 @@ https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.m
:files ( :exclude ,lsp-rust-analyzer-exclude-globs
:watcher ,(if lsp-rust-analyzer-use-client-watching "client" "notify")
:excludeDirs ,lsp-rust-analyzer-exclude-dirs)
:cfg ( :setTest ,(lsp-json-bool lsp-rust-analyzer-cfg-set-test) )
:cargo ( :allFeatures ,(lsp-json-bool lsp-rust-all-features)
:noDefaultFeatures ,(lsp-json-bool lsp-rust-no-default-features)
:features ,lsp-rust-features
Expand Down

0 comments on commit 76e3039

Please sign in to comment.