Neovim

Neovim is a Vim-based text editor, focusing on usability and extensibility. It enhances Vim by adding asynchronous processing, a powerful plugin architecture, and a robust API for better integration with modern development tools. Developed with community input, Neovim aims to modernize Vim’s user experience without sacrificing its core efficiency and flexibility, making it a favored choice for developers seeking a versatile text editor.

Install Dependencies

To install and configure Neovim you need the following packages:

user:~$ sudo apt install curl nodejs npm exuberant-ctags build-essential python3.11-venv zip

This guide has been tested on a Debian 12 (Bookworm) machine.

Install Neovim

To install Neovim follow the procedure below:

  1. Change to root user:

    user:~$ sudo su -
    root:~#
    
  2. Navigate to /opt. This is the location were we will install the Neovim Appimage:

    root:~# cd /opt
    
  3. Download the Appimage:

    root:/opt# curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
    
  4. Make it executable:

    root:/opt# chmod 754 nvim.appimage
    
  5. Extract the Appimage:

    root:/opt# ./nvim.appimage --appimage-extract
    
  6. Delete the Appimage file:

    root:/opt# rm nvim.appimage
    
  7. Rename the image folder to nvim:

    root:/opt# mv squashfs-root/ nvim
    
  8. Change owner and group:

    root:/opt# chown -R user:user nvim
    
  9. Navigate to /usr/local/bin:

    root:/opt# cd /usr/local/bin
    
  10. Create a symlink:

    root:/usr/local/bin# ln -s /opt/nvim/AppRun nvim
    

Configure Neovim with NvChad

We are using NvChad to enhance our Neovim installation. NvChad offers a blazing fast Neovim config providing solid defaults and a beautiful UI. To install it run the commands below. Choose no when it asks you to create an example custom configuration:

  1. Change back to your user:

    root:/usr/local/bin# exit
    user:~$
    
  2. Install NvChad and run Neovim:

    user:~$ git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1 && nvim
    
  3. (optional) Remove the default chadrc.lua file if you want to use the custom NvChad configuration provided in this dotfiles repo:

    user:~$ rm .config/nvim/lua/custom/chadrc.lua