Skip to content

Instantly share code, notes, and snippets.

@ehzawad
Last active August 21, 2023 08:46
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 ehzawad/1b9e91056f4cba59f114e5b2193c91ee to your computer and use it in GitHub Desktop.
Save ehzawad/1b9e91056f4cba59f114e5b2193c91ee to your computer and use it in GitHub Desktop.
neovim from source
Access to the latest features of Neovim
Install Neovim in the location you wish
Installation
(1) Install the build prerequisites:
sudo apt-get install ninja-build \
gettext libtool libtool-bin \
autoconf automake cmake g++ \
pkg-config unzip
(2) Clone the Neovim repository:
git clone https://github.com/neovim/neovim.git
(3) To install the stable release, run the following (otherwise the latest version of Neovim will be installed):
git checkout stable
(4) Build Neovim with build type ‘Release’ for better performance and in the location of your choice:
make CMAKE_BUILD_TYPE=Release \
CMAKE_INSTALL_PREFIX=<NEOVIM_LOCATION> install
(5) Add the following line to your .bashrc file:
export PATH=”<NEOVIM_LOCATION>/bin:$PATH”
(6) Enjoy Neovim:
nvim awesome-file.txt
(7) Make sure that everything is in order by typing :checkhealth inside Neovim and verify that the output is similar to this:
Neovim’s :checkhealth partial output
If anything went wrong
If something went wrong during the installation, try the following:
(1) Run the following command in the location where you clone the Neovim repository:
rm -rf build .deps # the command 'make distclean' performs the same
(2) Try again the installation process
Uninstall
If you wish to uninstall Neovim, it is pretty simple:
sudo rm -rf <NEOVIM_LOCATION>
@ehzawad
Copy link
Author

ehzawad commented Aug 18, 2023

sudo make install

@ehzawad
Copy link
Author

ehzawad commented Aug 21, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment