My vim setup for golang

My vim setup for golang

Ok, not vim, but nvim

tl;dr what does all this get me in my setup

Cleaned up my vim configuration which I was trying to set up for golang specifically. I did have vim-go already setup, but wanted to try out coc.vim along with gopls since it was around for sometime now. There were also a bunch of plugins which had been archived like syntastic

This setup will evolve and has space for a couple of things which I will incrementally add over time in the next few weeks.

Impressions so far

I turned off the lsp settings for ale, so that vim.coc would take it over, haven’t removed vim-go completely as I still use a couple of things from there.

The jump of definitions after moving over to gopls, and vim.coc giving over jumping to references, definitions, godocs comes almost the same to the setup for an IDE, along with being able to fold along with using nvim-treesitter is something which adds up really well along with ctrl+p

Changes and things kept from existing vim-go setup

Turned off the go autoimports functionality which is given over by vim-coc

The go-build and go-run keybindings which I had are already being used, same for the :GoAlternate keybindings to jump and split the panes when going over test and implementation files, along with the highlight configs is something which I have kept.

I did end up removing ultisnips which is one of the plugins presented in vim-go, with coc-go and coc-snippets, as they almost provide the same thing.

What does it lack as of now

I want to setup up delve as that’s what I feel is remaining as of now for a full out IDE setup which is what I was anyways using, this remains as of now. Will see how nvim-dap fixes up with my current setup and update this section with what I ended up with.


The latest vim config being used by me and what I did to set it up can be found here in the following link.