How to install and configure Neovim
In Ubuntu LTS 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.
- Vim-startify: start page with customizations
- CSS colors: display colors on top of #hexa codes
- FZF: FZF integration
- Vim-devicons: devicon support for nerdtree
- Nerdtree: file explorer for neovim
- Lightline: enhanced bottom status bar
- Coc: fast code completion engine