Skip to main content
Back to Extensions Directory
coc.nvim fallback icon

gopls extension for coc

Installation CommandVim prompt
:CocInstall coc-go
GitHub owner
Josa Gesell
Version
v1.3.35
npm package
coc-go
Requirements
coc ^0.0.82
License
MIT
Repository
GitHub
npm latest published 2024-10-22Registry checked 2026-08-23Node >=16Registry summary

Published Package Summary

coc-go

Go language server extension using gopls for coc.nvim.

Install

In your vim/neovim, run this command:

:CocInstall coc-go

Features

See gopls

Snippets

Snippets are imported from golang/vscode-go and require coc-snippets to be installed.

Development

  1. Run npm run build or npm run build:watch
  2. Link extension: npm run link / npm run unlink

Tools

FAQ

How does coc-go compare to vim-go?

With coc-go I do not aim to recreate the features of vim-go. For now, the main goal is to provide a convenient way to install gopls and use it with coc.nvim.

If you need more than the features provided by gopls, you are probably better of with vim-go or govim.

How to use coc-go with wasm?

Add this to you (local) coc-settings.json (run :CocLocalConfig).

{
  "go.goplsEnv": {
    "GOOS": "js",
    "GOARCH": "wasm",
  }
}

Running gopls as a daemon

coc-go runs gopls as shared daemon by passing -remote=auto to gopls. To disable this behavior set go.goplsUseDaemon to false.

See Running gopls as a daemon for more information.

License

MIT © Josa Gesell.

Read the complete README
  • gopls extension for coc
Activation Events
  • onLanguage:go
  • onLanguage:gomod
  • onCommand:go.install.gomodifytags
  • onCommand:go.install.goplay
  • onCommand:go.install.gopls
  • onCommand:go.install.gotests
  • onCommand:go.install.impl
  • onCommand:go.install.tools
  • onCommand:go.version
Developer Resources

Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.

Open Developer Guide

Version History

This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.