Setting up Neovim

1 minute read

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

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install neovim.
brew install neovim

The packages include:

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


Setting up autocompletion