Users should be able to bring their own rust-analyzer binary
iwinux opened this issue · comments
Currently there's no obvious way to opt-out of the auto-download behavior introduced by #4.
The source code of plugin.py
shows that this plugin reads the version number from $HOME/Library/Caches/Sublime Text/Package Storage/LSP-rust-analyzer/VERSION
, and compares it against the desired version hardcoded in the global variable TAG
. So a quick & dirty workaround is:
cd '$HOME/Library/Caches/Sublime Text/Package Storage'
mkdir -p LSP-rust-analyzer
# check `TAG` in plugin.py for exact version number
echo -n 2022-01-10 > LSP-rust-analyzer/VERSION
You may ask "why would you want to do that?" Well, the reason is today I open my new Rust project with Sublime Text 4, and the LSP refuses to start because LSP-rust-analyzer tries to download the binary on my behalf (which is already installed on my machine, by myself), yet keeps failing due to some unknown "HTTP 304 Error"....
Hey the HTTP 304 error is caused by another extension messing with the urllib environment.
You might want to update the wakatime
extension if you were using it!
But yeah I'll work on a way to disable auto downloading and allow users to vendor their own version