Setting up Neovim plus Coc for Python, C++, Go, Rust and javascript

There is no doubt, coding is getting more complex nowadays. I have to code in Python, C and C++ and I have usually used vi for small edits. For production I have used PyCharm, for C, C++ Visual Studio.

Visual Studio Code is a great editor with multiple extensions to support different languages. Although, I am used to vim and I always tried to setup intellisense to support different languages.

I like to use Visual Studio Code, however, I feel more productive with vi editor. In this post I’m setting up NeoVim with Coc to code in my favorite languages. In the past I tried vim with different plugins to have code completion.

Finally, I think NeoVim plus Coc is a good option to use vim.

COC requires nodejs and yarn. So, first step is to install those tools:

Install nodejs, create node repo:

curl -sL | sudo bash 

Install nodejs

sudo dnf install nodejs

Install yarn:

Create yarn repo with

name=Yarn Repository

Install yarn

sudo dnf install yarn

Install Vim Plug:

sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \'

Setup Plugin Manager in your init.vim file:

Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}

Launch NeoVim and manage code completion from inside NeoVim. This is what I like more about COC, you can install all the code completion extensions using CocInstall:

Neovim. Show Installed Coc Extensions
CocInstall coc-rust-analyzer and others....
CocInstall Output


Notes: Set interpreter to python 3. Optional use Jedi or language server. I’ll use Jedi:

I had to remove python3-jedi package from Fedora and install it with pip3. You can use CocConfig to setup json file and toggle jedi or language server.

Code Completion JEDI
Code Completion JEDI disabled


Code completion using clangd


You need to setup Rust-Analyzer with CocConfig


Code completion using gopls

SetUp Go settings with CocConfig.

My coc-settings.json:

From CocConfig

Leave a Reply

Your email address will not be published. Required fields are marked *