A tiny plugin for Neovim Golang development written in Lua. This plugin is for personal purpose only, most of the code was copied from go.nvim plugin.
Using vim plug
Plug 'dinhhuy258/go.nvim'
- Neovim >= 0.5.0
nvim-treesitter
pluginnvim-dap
,nvim-dap-ui
plugins (optional)
Not support, you can use LSP
- Toggle between code and tests with
:GoSwitch
- Format the code with
:GoFormat
- Add or remove struct tags with
:GoAddTags
,:GoRemoveTags
andGoClearTag
- Generate unit tests for current function
GoAddTest
- Gererate unit tests for current file
GoAddTests
- Run single unit test for current function
:GoTest
- Run all tests for current file
:GoTests
- Start debugger using
:GoDebugStart
- Stop debugger using
:GoDebugStop
- Run Go command with
:Go
, Eg::Go mod tidy
- Run Make command with
:GoMake
, Eg::GoMake lint