Skip to content

Instantly share code, notes, and snippets.

@tirzasrwn
Created August 13, 2025 05:53
Show Gist options
  • Select an option

  • Save tirzasrwn/ab3d0aaa2c0e3026fd74296df05dc1bd to your computer and use it in GitHub Desktop.

Select an option

Save tirzasrwn/ab3d0aaa2c0e3026fd74296df05dc1bd to your computer and use it in GitHub Desktop.

To install Neovim from the source using Git with a depth of 1 for the stable version, follow these steps:

πŸ› οΈ Prerequisites

Before you begin, ensure you have the necessary dependencies installed. You will need:

  • CMake (version 3.14 or higher)
  • Ninja (optional, but recommended)
  • Build tools (like gcc or clang)
  • Git

You can install these dependencies using your package manager. For example, on Ubuntu, you can run:

sudo apt update
sudo apt install -y build-essential cmake git ninja-build

πŸ“₯ Clone Neovim Repository

Next, clone the Neovim repository with a depth of 1 to get the latest stable version:

git clone --depth 1 --branch stable https://github.com/neovim/neovim.git

πŸ”§ Build Neovim

Navigate to the cloned directory and build Neovim:

cd neovim
make CMAKE_BUILD_TYPE=Release

πŸš€ Install Neovim

After the build process is complete, you can install Neovim using:

sudo make install

βœ… Verify Installation

To verify that Neovim has been installed correctly, run:

nvim --version

This should display the version of Neovim you just installed.

πŸ“ Additional Notes

  • If you want to install additional features or plugins, consider checking the Neovim documentation for further customization.
  • You can also create a symbolic link to make it easier to run Neovim from anywhere:
sudo ln -s /usr/local/bin/nvim /usr/bin/nvim

This completes the installation of Neovim from the source using Git with a depth of 1 for the stable version. If you have any questions or need further assistance, feel free to ask!

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