Setting up Neovim
Published:
This post explains how to install and setup neovim.
Neovim
Neovim (nvim) is an extensible, open-source text editor that is a refactor and improvement of Vim. It aims to enhance the usability and feature set of Vim, while maintaining compatibility with Vim’s commands and configuration.
How to install
- Install Homebrew.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install neovim.
brew install neovim
- Download package
The packages include:
- vim-plug
- nvim-notify
- markdown-preview.nvim
- nvim-noice
- nvim-nui
- nvim-tree
- nvim-treesitter
- image.nvim
- vim-gutentags
Move vim-plug into runtime autoload path.
mv -r vim-plug /home/linuxbrew/.linuxbrew/Cellar/neovim/0.11.0/share/nvim/runtime/autoload
- Copy downloaded package into
~/.config/.
cp -r nvim ~/.config
Setting up markdown-preview
- Install ctags.
sudo apt-get install -y exuberant-ctags
- Write
~/.ctags.
--recurse=yes
--exclude=.git
--exclude=BUILD
--exclude=.svn
--exclude=*.js
--exclude=vendor/*
--exclude=node_modules/*
--exclude=db/*
--exclude=log/*
--exclude=\*.log
--exclude=\*.min.\*
--exclude=\*.swp
--exclude=\*.bak
--exclude=\*.pyc
--exclude=\*.class
--exclude=\*.sln
--exclude=\*.csproj
--exclude=\*.csproj.user
--exclude=\*.cache
--exclude=\*.dll
--exclude=\*.pdb
--exclude=\*.obj
--exclude=\*.exe
- Validate Node.js installation.
node --version
- Refresh session
exec $SHELL
- Install packages to resolve dependancy:
sudo npm install tslib
npm install neovim
sudo npm install neovim
sudo npm install @chemzqm/neovim
sudo npm install log4js
sudo npm install socket.io
sudo npm install msgpack-lite
- Run this in nvim:
mdkp#util#install
- Preview markdown files.
:MarkdownPreview
Setting up ctags
- Install ctags
brew install universal-ctags
- gu
```shell nvm install –lts
