Neovim Intellisense with coc

Conquerer of Completion

This plugin is too featureful (bloated) to explain in a single blog post

Good thing the author provided extensive documentation here

Install with vim-plug

make sure you have yarn installed if you choose the second way

Create a directory called plug-config and an entry for coc

Create basic config file

Head over to the readme and grab his example config

Add the following to your init.vim

Checking coc health

You can run :checkhealth and there should now be an entry for coc

You can use g:coc_node_path to point to your node executable

You can also run :CocInfo to get some useful info

Install extensions

You can install extensions for languages like this:

There are many more extensions to choose from here:

coc-extensions

You can list all of the extension commands with:

You can uninstall an extension with:

You can manage your extensions with:

Hit to see a list of options for each extension

Configuration

Run :CocConfig this will open the file ~/.config/nvim/coc-settings.json

here you can add language servers

and other configuration like autoformat and adding a location for snippets (I'll go over snippets later)

for more info on configuring your settings checkout this page

Optional install watchman

For watchman supprt install watchman

  • Mac

  • Ubuntu

  • Arch

Note

watchman can be a memory hog, to stop all watchman processes and free up some memory run

Automatically reinstall the extensions you use

If you use neovim and already have node installed, you can use the following script to reinstall your favorite extensions


Tagged in neovim