Skip to content
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

Allow setting rust-analyzer path via rust-analyzer.json , .vscode/settings.json #563

Closed
Ngalstyan4 opened this issue Nov 8, 2024 · 0 comments · Fixed by #567
Closed
Labels
enhancement New feature or request

Comments

@Ngalstyan4
Copy link

Feature description

In VSCode you can specify the path to the rust-analyzer by setting the rust-analyzer.server.path key in .vscode/settings.json:

{ "rust-analyzer.server.path": "~/.local/bin/rust-analyzer-linux" }

This is documented in the rust-analyzer manual, and the relevant implementation within the VSCode extension is here


In rustaceanvim, there is a similar configuration option: vim.g.rustaceanvim.server.cmd(config definition in source).

However, it would be nice if rustaceanvim picked up custom rust-analyzer binary from settings.json as well.
This is particularly useful when different projects require different rust-analyzer binaries.
Currently we need to manually write some logic to configure per project rust-analyzer via custom $PATH or per-project vim.g.rustaceanvim.server.cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants