How to install and configure Neovim

Rphl-Mstl
Tech notes and Geek stuff
1 min readJul 4, 2023

--

In Ubuntu LTS 22.04

Neovim in Ubuntu 22.04

Install

Get the latest release on: https://github.com/neovim/neovim/releases/tag/stable or just install the snap package on Ubuntu 22.04 (repo version is out-of-date):

snap install nvim — classic

Config

The config file should be located here: ~/.config/nvim/init.vim

Mine is written in vimscript: https://gitlab.com/rphlm/dotfiles-debian/-/raw/main/.config/nvim/init.vim

One of the most usefull option: set Neovim to use the system clipboard

"CLIPBOARD
set clipboard+=unnamedplus

Plugins

Install Vim-Plug: https://github.com/junegunn/vim-plug

sh -c ‘curl -fLo “${XDG_DATA_HOME:-$HOME/.local/share}”/nvim/site/autoload/plug.vim — create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

Add a vim-plug section to ~/.config/nvim/init.vim

call plug#begin()
Plug ‘mhinz/vim-startify’
Plug ‘ap/vim-css-color’
Plug ‘junegunn/fzf’, { ‘do’: { -> fzf#install() } }
Plug ‘junegunn/fzf.vim’
Plug ‘spf13/vim-autoclose’
Plug ‘ryanoasis/vim-devicons’
Plug ‘preservim/nerdtree’
Plug ‘itchyny/lightline.vim’
Plug ‘preservim/nerdcommenter’
call plug#end()

Start nvim and run :PlugInstall to install the plugins. And run PlugUpdate if you need to update the plugins.

  1. Vim-startify: start page with customizations
  2. CSS colors: display colors on top of #hexa codes
  3. FZF: FZF integration
  4. Vim-devicons: devicon support for nerdtree
  5. Nerdtree: file explorer for neovim
  6. Lightline: enhanced bottom status bar
  7. Coc: fast code completion engine

--

--

Rphl-Mstl
Tech notes and Geek stuff

OS explorer, UI & UX passionate, Voxels crafter, code lover, Video Games player, Podcasts listener, Music amateur // Digital Publishing professional