Louis Better than before

Neovim with Vim-Plugins Toolkits

Neovim might be a nice integrated development environment and able to enhance your workflow when executing many miscellaneous tasks on Linux. It’s very useful to make my life as an engineer a little easier and a little better. In this post, I would take notes of my configuration with numerous plugin tools and vim-snippets.

Prerequisites

Make sure your operation with nvim (my MacOS is installed NVIM v0.4.4 version), python 3.6 version (to support YouCompleteMe).

NVIM

Neovim config file is named init.vim and its location on .config/nvim/init.vim. All your settings can be put into this file. Here is my example configuration for a reference; for more details, refer to nvim_configuration.

"----------------------------------------------------------------
" 1. Plugins
"----------------------------------------------------------------
call plug#begin('~/.config/nvim/plugged')
Plug 'nvim-lua/completion-nvim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'Valloric/YouCompleteMe'
Plug 'dense-analysis/ale'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'https://github.com/scrooloose/nerdtree.git'
Plug 'dpelle/vim-LanguageTool'
Plug 'kamykn/popup-menu.nvim'
Plug 'kamykn/spelunker.vim'
Plug 'vim-scripts/DoxygenToolkit.vim'
Plug 'pangloss/vim-javascript'
Plug 'matze/vim-move'
call plug#end()
...

Besides, in the configuration, I chose my personal favorite plugin manager, vim-plug, which is a beautiful and minimalist plugin for Neovim. It is straightforward to set up and customize your configuration and generally specified with a reference to plugins repo. To see more of what vim-plug can do, check out their documentation.

The three Vim-plugins toolkits described below are my favorites, the ones I use in virtually every profile I have, no matter what programming language I’m using.

Essential Vim-Plugin Toolkits

List of Vim-Plugin Toolkits

  1. YouCompleteMe
  2. Vim-Snippets
  3. Neoclide/Coc.nvim

YouCompleteMe

YouCompleteMe is a fast and fuzzy-search code completion for vim. You could realize that no keyboard shortcut had to be press to get the list of completion candidates. The user just types and the suggestions pop up by themselves. In addition, YCM provides semantic IDE-like features in a number of languages, including:

  • Finding declarations, definitions, usages, etc. of identifiers.
  • Display type information for class, variables, functions, etc.

For more details, you could refer to the ycm-core/YouCompleteMe repo.

Vim-Snippets

Vim-Snippets is a great way to save keystrokes without having to set up languages servers. There are different forks of snippets engines which allow the user to insert snippets by typing the name of snippet hitting the expansion mapping. In fact, in UltiSnips directroy, there are many framework snippets and additional library that users are available to access. Besides, its wiser to define your personal snippets or customize snippets.

For more details, you could refer to honza/vim-snippets repo.

Neoclide/Coc.nvim

Neoclide/Coc.nvim is a complete Language Server Protocol (LSP) client that provides support for features base on the specific programming languages, including:

  • Language aware autocompletion
  • Go to definition
  • Find reference

Types are automatically imported, and you can see function signatures and relevant code completions your type.

Conclusion

The above description is of which several vim-plugin toolkits I recommended. The others are also helpful to make my life as an engineer a little easier and a little better. What Vim-Plug toolkits you are using? Please feel free to share your favorites in the comments. Thanks for your reading.

Reference

[1] Neovim setup for c++ and openFrameworks development

[2] 10 essential Vim plugins

[3] Configure coc.nvim for C/C++ Development

[4] A guide to modern Web Development with Neovim

[5] Top 10 Vim plugins for programming in multiple languages

Feel free to leave the comments below or email to me. Any pieces of advice are always welcome. :)