LanguageClient-neovim
LanguageClient-neovim copied to clipboard
Precompiled binary is not available for M1 Macs (Darwin arm64)
Describe the bug
sh install.sh does not work on M1 as no pre-built binaries exist for Darwin arm64.
Environment
- neovim/vim version (
nvim --versionorvim --version): NVIM v0.5.1 - This plugin version (
git rev-parse --short HEAD): a42594c - This plugin's binary version (
bin/languageclient --version): N/A - Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here): Gist
- Language server link and version: N/A
To Reproduce
Steps to reproduce the behavior:
- Install via VimPlug, with
sh build.shas the post-installation (post-installation will fail) - Go to installation folder and run
sh build.sh.
Current behavior
% sh install.sh
No pre-built binary available for Darwin arm64.
cargo is not available. Abort.
Expected behavior
The plugin installs normally.
Screenshots
N/A
Additional context
N/A
Update: I managed to run sh build.sh by building locally, after installing cargo (brew install rust). Still, a official binary would be nice :)
% ./languageclient --help
languageclient 0.1.161
Junfeng Li <[email protected]>
Language Server Protocol (LSP) support for vim and neovim
USAGE:
languageclient
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
Update 2: Works perfectly! I would like to suggest making cargo is not available. Abort. instruct the user to install Rust if they want to build locally. Thank you for such a good plugin. ^^
can confirm installing cargo fixes the build, would be nice to get an arm build
to get the build to succeed I had to modify the rust-toolchain file to 1.57.0, as the 1.46.0 doesn't seem to have an arm64 build available?
There is no longer a build.sh file. So after updating the rust-toolchain file (mentioned above) and installing Rust with brew install rust (also from above), from your ~/.local/share/nvim/plugged/LanguageClient-neovim folder, use cargo build --release to build the plugin. Then run mv target/release/languageclient bin to move the binary so neovim can find it.
In case it saves anyone a few minutes, don-smith's answer above worked for me, but the directory on my computer was ~/.vim/bundle/LanguageClient-neovim/.
- Make sure Rust is installed.
- Edit the
rust-toolchainfile to give it a more recent Rust version. I used 1.62.0. - Run
cargo build --release - Run
mv target/release/languageclient bin