go.nvim

go.nvim

A modern go neovim plugin based on treesitter, nvim-lsp and dap debugger. It is written in Lua and async as much as possible. PR & Suggestions welcome. The plugin covers most features required for a gopher.

  • Async jobs with libuv
  • Syntax highlight & Texobject: Native treesitter support is faster and more accurate. All you need is a theme support treesitter, try aurora. Also, there are quite a few listed in awesome-neovim
  • All the GoToXxx (E.g reference, implementation, definition, goto doc, peek code/doc etc) You need lspconfig setup. There are lots of posts on how to set it up. You can also check my navigator gopls setup lspconfig.lua
  • Runtime lint/vet/compile: Supported by lsp (once you setup up your lsp client), GoLint with golangci-lint also supported
  • Build/Make/Test: Go.nvim provides supports for these by an async job wrapper.
  • Test coverage: run test coverage and show coverage sign
  • Dlv Debug: with nvim-dap and Dap UI.
  • Load vscode launch configuration
  • Unit test: generate unit test framework with gotests. Run test with richgo/ginkgo/go test
  • tag modify: Supports gomodifytags
  • Code format: Supports LSP format and GoFmt
  • CodeLens : gopls codelens and codelens action support
  • Comments: Add autodocument for your package/function/struct/interface. This feature is unique and can help you suppress golint errors…
  • Go to alternative go file (between test and source)
  • Test with ginkgo, richgo inside floaterm (to enable floaterm, guihua.lua has to be installed)
  • Go 1.18beta1 support, configure your go to go1.18beta1 in config
auto tag