gopher.nvim/README.md(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# gopher.nvim
Minimalistic plugin for Go development in Neovim written in Lua.
It's not an LSP tool, the main goal of this plugin add go tooling support in neovim.
## Install
Pre-dependency: [go](https://github.com/golang/go) (tested on 1.17 and 1.18)
```lua
use {
"olexsmir/gopher.nvim",
requires = { -- dependencies
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
}
```
Also, run `TSInstall go` if install the `go` parser if not installed yet.
## Features
1. Install requires go tools:
This will install next tools:
- [gomodifytags](https://github.com/fatih/gomodifytags)
```viml
:GoInstallDeps
```
2. Modify struct tags:
By default be added/removed `json` tag, if not set.
```viml
:GoTagAdd json " For add json tag
:GoTagRm yaml " For remove yaml tag
```
3. Run `go mod` command
```viml
:GoMod tidy " Runs `go mod tidy`
:GoMod init asdf " Runs `go mod init asdf`
```
4. Run `go get` command
Link can has a `http` or `https` prefix.
You can provide more that one package url.
```viml
:GoGet github.com/gorilla/mux
```
## Thanks
- [go.nvim](https://github.com/ray-x/go.nvim)
|