-
-
Notifications
You must be signed in to change notification settings - Fork 884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a variable for customizing rust-analyzer.cargo.targetDir
#4506
Comments
Edit: well, no. The below does not work. I can see a didChangeConfiguration message getting logged, and its param JSON is identical to what I see with a known-working Based on #167, it seems that lsp-mode does support passing/overriding LSP config options generically after initialization, via
I can see/debug the resulting As someone with 0 elisp knowledge, I found discussion of the similar eglot option to be useful for understanding the format of this thing: joaotavora/eglot#363. It's definitely nice to have prepacked per-LSP-server customize vars for common options, but I do also wish that we had this |
I looked at this a bit more, though unfortunately the result is that I'm convinced that there's no way to set "override" options for rust-analyzer without changing The issue with According to #3686, there's an alternate mechanism to generically set options, via Line 341 in c36b95b
rust-analyzer integration skips that and just produces a config object in a more hardcoded way - it looks at pre-registered custom variables, but doesn't seem to integrate at all with the lsp-register-custom-settings system (Line 1655 in c36b95b
Since it seems like post-startup configuration via |
The
rust-analyzer.cargo.targetDir
setting allows controlling the directory thatrust-analyzer
will use for build artifacts. It is useful to set this to something other than the default project's target directory because only one ofcargo
andrust-analyzer
can use the directory at a time, they each exclusively lock it. This means that running tests andrust-analyzer
running in the background can contend, which results in a poor user experience. Therefore, it would be nice iflsp-mode
allowed configuring this setting via a custom variable or something.More details: https://rust-analyzer.github.io/manual.html#rust-analyzer.cargo.targetDir
Thanks for all your work on
lsp-mode
!The text was updated successfully, but these errors were encountered: