Depending on your operating system this process will be different, so I will cover Linux, Windows, and MacOS.
There are a few ways of installing neovim on Linux, so I will touch on all the relevant ones.
This is the canonical way of installing software on Linux and I encourage you to use it. However, considering how fast neovim is moving, many distributions will lag a version or two behind the latest stable release, or even a few. If you use Arch Linux or NixOS, you should have the latest version, but double-checking never hurts. As of writing this, the latest stable release of neovim is version 0.9.4. You can check the current stable release here.
If your system's package manager does not have the latest version available, install it with a different method.
AppImages are a packaging format that is supposed to be distribution-agnostic. This means they should work on any Linux system. There are exceptions to this, like NixOS, but on Debian, Ubuntu, Fedora, or any derivatives of these you should be fine using an AppImage.
It is important that you have version 2 of the fuse library installed on your system. On Debian and
Ubuntu this package is called libfuse2
. On Fedora it is called fuse-devel
, not fuse
.
Fedora packages that are libraries end in -devel
. Make sure the package and version are
correct before installing any AppImage.
Other than fuse there are no dependencies though, so you can download the latest version of neovim:
$ curl -L "https://github.com/neovim/neovim/releases/download/stable/nvim.appimage" -o nvim
Then you need to make it executable:
$ chmod +x nvim
And finally, move it into a directory which is part of your $PATH.
# Pick one of the listed directories
$ echo $PATH
# Move `nvim` into one of them
$ mv nvim /usr/bin/nvim
Now you should be able to run nvim --version
in your terminal and see an output similar to this:
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1693350652
Compiling neovim is surprisingly easy. You will need a set of prerequisites. Assuming you have those installed, building neovim is very simple.
Start by cloning neovim into some directory on your system:
$ mkdir -p ~/.local/src
$ git clone https://github.com/neovim/neovim.git ~/.local/src/neovim
$ cd ~/.local/src/neovim
Then, checkout the stable
branch (or any other release-*
/ master
branch if you want
a particular version):
$ git checkout stable
Now, you can compile it using make
:
$ make CMAKE_BUILD_TYPE=Release
And, to put the produced files where they belong:
$ sudo make install
If you come back to this later to update neovim, make sure to run the following commands to clear out any build artifacts, and pull the latest version of the code.
$ make distclean
$ git pull origin <branch>
For more information see Building Neovim.
Due to the isolated nature of Flatpak and Snap, programs will have restricted permissions depending on your system's configuration. neovim has shown to have some quirks because of this, and especially the Snap version of it has caused a lot of performance issues for a lot of people. I do not recommend installing neovim with either, but it exists for these package managers if you really want it.
If you aren't already using a package manger to install most of your software, you really should. neovim, like a lot of other software is available via package mangers like
If you really hate package managers, or cannot install any of them because of company restrictions, neovim distributes an installer as well.
If you don't already use Homebrew to install most of your software, you really should. neovim is available as a package there which you can install. If you don't want to use Homebrew for whatever reason, you can download a tarball distributed by neovim instead.