LSP-rust-analyzer icon indicating copy to clipboard operation
LSP-rust-analyzer copied to clipboard

Consider providing a mode to use a preinstalled (system) `rust-analyzer`

Open intelfx opened this issue 9 months ago • 3 comments

Currently, LSP-rust-analyzer automatically downloads into $HOME and runs a binary from Internet. This is not necessarily welcome.

Consider implementing a mode similar to LSP-clangd's "binary": "system" where LSP-rust-analyzer would invoke a rust-analyzer that is already installed elsewhere and/or available in $PATH.

intelfx avatar May 02 '24 16:05 intelfx

The reason it's not recommended is that the functionality and settings that are part of this package might not be fully compatible with your system version of rust-analyzer.

At minimum it can cause warnings about settings being invalid and possibly more serious issues (in theory).

That said, I'm not saying that it definitively shouldn't be supported. On your own risk.

rchl avatar May 03 '24 06:05 rchl

The reason it's not recommended is that the functionality and settings that are part of this package might not be fully compatible with your system version of rust-analyzer.

At minimum it can cause warnings about settings being invalid and possibly more serious issues (in theory).

Perhaps, but as I said, automatically downloading and running binaries from Internet is not necessarily welcome; and in the environments it is not welcome, this (i.e. security) trumps convenience.

That said, I was not aware it was not recommended. Would you accept a PR adding a "binary": "system" mode like LSP-clangd has?

intelfx avatar May 08 '24 22:05 intelfx

PR is welcome as long as it's documented and makes it clear what the disadvantages are (what I've mentioned more or less).

rchl avatar May 11 '24 07:05 rchl