Skip to content

Instantly share code, notes, and snippets.

@MultisampledNight
Last active April 21, 2021 19:21
Show Gist options
  • Save MultisampledNight/35be79b75953d5f6a033e7aae9cc1c06 to your computer and use it in GitHub Desktop.
Save MultisampledNight/35be79b75953d5f6a033e7aae9cc1c06 to your computer and use it in GitHub Desktop.
Get NeoVim Nightly quickly
#!/usr/bin/zsh
echo "Make sure you've installed 'libtermkey' 'msgpack-c' 'libvterm' 'libluv' 'libtree-sitter.so' 'git' 'cmake' 'ninja' 'lua51-mpack' 'lua51-lpeg' and 'gperf'. This depends on your package manager. Press Ctrl + C to abort if you haven't installed the dependencies yet. (Most likely you haven't gotten tree-sitterdev or similar yet)"
sleep 4
# prepare
git clone https://github.com/neovim/neovim.git
cd neovim
git reset --hard nightly
# build
cmake -S. -Bbuild -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
# install
mkdir ../neovim-bin
export DESTDIR="$(pwd)/../neovim-bin"
cd build
cmake --build . --target install
cd ../..
# make accessing easy
echo "\nalias nvim-nightly='$(pwd)/neovim-bin/usr/bin/nvim'" >> ~/.zshrc
echo "Created an alias called 'nvim-nightly' in your .zshrc. Remember to update the path if you move the 'neovim-bin' folder."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment