
Gvim Intellisense with Conquerer of Completion (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
" Stable version of coc
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Keeping up to date with master
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}make sure you have yarn installed if you choose the second way
npm i -g yarnCreate a directory called plug-config and an entry for coc
mkdir %userprofile%\.config\vim\plug-config
type nul > %userprofile%\.config\plug-config\coc.vimCreate basic config file
Head over to the readme and grab his example config
Add the following to your .vimrc
source $HOME\.config\vim\plug-config\coc.vimChecking 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:
:CocInstall coc-json coc-python coc-snippets coc-vimlspThere are many more extensions to choose from here:
You can list all of the extension commands with:
:CocList commandsYou can uninstall an extension with:
:CocUninstall coc-htmlYou can manage your extensions with:
:CocList extensionsHit
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)
{
"coc.preferences.formatOnSaveFiletypes": [
"css",
"markdown",
"javascript",
"graphql",
"html",
"yaml",
"json",
"python"
],
"python.linting.enabled": true,
"python.linting.pylintEnabled": true
}for more info on configuring your settings checkout this page