vim-go adds Go tooling to Vim and Neovim: build, test, navigation, formatting, linting, and gopls-backed analysis through editor commands.
Overview
vim-go is a Vim plugin that layers Go development workflows onto Vim or Neovim. It targets developers who edit Go code in those editors and want compile, install, test, and run operations without leaving the buffer.
Editor commands cover building packages, running tests (including single functions), executing files, jumping to definitions, browsing documentation, managing imports, renaming identifiers, viewing coverage, and editing struct tags. Syntax highlighting and folding are included for Go sources.
Much of the language intelligence can flow through gopls, shared with other Vim plugins when configured. Users may disable gopls integration and point vim-go at alternative tools instead. Additional commands support linting, vet, errcheck, and deeper static analysis such as implements, callees, and referrers.
Installation is handled through common Vim package managers, with a bundled command to install the external binaries vim-go expects. Documentation ships inside the plugin and a project wiki offers tutorials.
Key features
- Build, install, and test Go packages
- Run current Go files from the editor
- gopls-backed completion and analysis
- Go to definition and documentation lookup
- Import and rename helpers
- Test coverage highlighting
- Struct tag add and remove commands
- Lint, vet, and errcheck integration
Use cases
- Go development in Vim or Neovim
- In-editor test and build loops
- Navigating large Go codebases
- Sharing gopls with other Vim plugins