DEV Community

Cover image for Installing latest Neovim and LunarVim on Debian
Maciej Błędkowski
Maciej Błędkowski

Posted on • Updated on

Installing latest Neovim and LunarVim on Debian

Introduction

What is the first thing, that we would love to do on our freshly installed Debian instance? Code of course! There multiple great code editors out there, but the one that is almost universaly beloved by the hackers is Vim and its successor Neovim.
Here you can find how to install the latest release of Neovim; and its distribution LunarVim, that makes coding in nvim easier than ever.

Neovim

  1. Go to Neovim release page
  2. Download an AppImage
  3. Open Bash (or any other POSIX compliant shell)

    1. Move an AppImage file to /usr/local/bin/, and rename it from nvim.appimage to just nvim - mv ~/Downloads/nvim.appimage /usr/local/bin/nvim
    2. Set the CUSTOM_NVIM_PATH to the location of Neovim binary - CUSTOM_NVIM_PATH=/usr/local/bin/nvim
    3. Run the following commands:
    set -u
    sudo update-alternatives --install /usr/bin/ex ex "${CUSTOM_NVIM_PATH}" 110
    sudo update-alternatives --install /usr/bin/vi vi "${CUSTOM_NVIM_PATH}" 110
    sudo update-alternatives --install /usr/bin/view view "${CUSTOM_NVIM_PATH}" 110
    sudo update-alternatives --install /usr/bin/vim vim "${CUSTOM_NVIM_PATH}" 110
    sudo update-alternatives --install /usr/bin/vimdiff vimdiff "${CUSTOM_NVIM_PATH}" 110
    

    1

    1. [Optional] Add neovim python package for python support - sudo apt install python3-neovim 1

LunarVim

  1. Install all the necessary packages (some of them are optional): sudo apt install git make python3 python3-pip python3-pynvim npm nodejs cargo
  2. Run command from LunarVim's installation guide to get the latest release. As of the day I am writing this post it is:

    LV_BRANCH='release-1.3/neovim-0.9' bash <(curl -s https://raw.githubusercontent.com/LunarVim/LunarVim/release-1.3/neovim-0.9/utils/installer/install.sh)

  3. Answer as follows:

    1. NodeJS dependencies - Yes
    2. Python dependencies - No (pip environment is managed by the system, and we have already installed pynvim)
    3. Rust dependencies - No (because rustc is probably to old) ## Nerd Fonts In order for LunarVim to render correctly, you need one of the Nerd Fonts patched font.
  4. Clone the Nerd Fonts repo - git clone --depth=1 git@github.com:ryanoasis/nerd-fonts.git

  5. cd into cloned repo - cd nerd-fonts

  6. Run shell script in the repo, to install all Nerd Fonts patched fonts - ./install.sh

  7. Change the default font in your terminal to one of the Nerd Fonts (e.g. JetBrains Mono Nerd Font) and restart it.

Top comments (0)