sublimelsp / LSP-rust-analyzer

Convenience package for rust-analyzer
MIT License
69 stars 11 forks source link

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

Open intelfx opened 3 months ago

intelfx commented 3 months ago

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.

rchl commented 3 months ago

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.

intelfx commented 3 months ago

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?

rchl commented 3 months ago

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