Skip to content

Instantly share code, notes, and snippets.

@chussenot
Forked from darcyparker/installNeovim.sh
Created January 6, 2020 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chussenot/c4bde8a44287a03a08a9c8daf5ffbce9 to your computer and use it in GitHub Desktop.
Save chussenot/c4bde8a44287a03a08a9c8daf5ffbce9 to your computer and use it in GitHub Desktop.
Build and install neovim for Debian
#!/usr/bin/env bash
#Build and install neovim for Debian
#See: https://neovim.io/
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start
#Save current dir
pushd . > /dev/null
#Install dependencies
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
cmake \
g++ \
gettext \
libncurses5-dev \
libtool \
libtool-bin \
libunibilium-dev \
libunibilium4 \
ninja-build \
pkg-config \
python-pip \
python3-pip \
software-properties-common \
unzip
# Enable use of python plugins
# Note: python neovim module was renamed to pynvim
# https://github.com/neovim/neovim/wiki/Following-HEAD#steps-to-update-pynvim-formerly-neovim-python-package
# pip uninstall pynvim neovim
# pip3 uninstall pynvim neovim
pip install setuptools
pip install --upgrade pynvim
pip3 install setuptools
pip3 install --upgrade pynvim
gem install neovim
npm install -g neovim
#Get or update neovim github repo
mkdir -p ~/src
cd ~/src || exit
if [ ! -e ~/src/neovim ]; then
git clone https://github.com/neovim/neovim
else
cd neovim || exit
git pull origin
fi
cd ~/src/neovim || exit
git checkout master
#Remove old build dir and .deps dir
rm -rf build/
rm -rf .deps/
make distclean
# Build and install neovim
make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr/local/"
make install
# Enable use of ruby plugins
# sudo gem install neovim
#Restore dir
popd
echo "nvim command: $(which nvim)"
echo "nvim command: $(ls -al "$(which nvim)")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment