[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang

chore: update readme

olexsmir.xyz b7ce5d1f 9bf72afc

verified
Changed files
+50 -54
+50 -54
README.md
··· 4 4 5 5 Minimalistic plugin for Go development in Neovim written in Lua. 6 6 7 - It's **NOT** an LSP tool, the main goal of this plugin is to add go tooling support in Neovim. 7 + It's **NOT** an LSP tool, the goal of this plugin is to add go tooling support in Neovim. 8 8 9 - > If you want to use new and maybe undocumented, and unstable features you might use [develop](https://github.com/olexsmir/gopher.nvim/tree/develop) branch. 9 + > All development of new and maybe undocumented, and unstable features is happening on [develop](https://github.com/olexsmir/gopher.nvim/tree/develop) branch. 10 10 11 11 ## Install (using [lazy.nvim](https://github.com/folke/lazy.nvim)) 12 12 13 13 Requirements: 14 14 15 15 - **Neovim 0.10** or later 16 - - Treesitter `go` parser(`:TSInstall go` if you use [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)) 17 - - [Go](https://github.com/golang/go) installed (tested on 1.23) 16 + - Treesitter parser for `go`(`:TSInstall go` if you use [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)) 17 + - [Go](https://github.com/golang/go) installed 18 18 19 19 ```lua 20 + -- NOTE: this plugin is already lazy-loaded, it adds only about 1ms of load 21 + -- time to your config 20 22 { 21 23 "olexsmir/gopher.nvim", 22 24 ft = "go", ··· 25 27 build = function() 26 28 vim.cmd.GoInstallDeps() 27 29 end, 30 + ---@module "gopher" 28 31 ---@type gopher.Config 29 32 opts = {}, 30 33 } 31 34 ``` 32 35 33 - ## Configuration 34 - 35 - > [!IMPORTANT] 36 - > 37 - > If you need more info look `:h gopher.nvim` 38 - 39 - **Take a look at default options (might be a bit outdated, look `:h gopher.nvim-config`)** 40 - 41 - ```lua 42 - require("gopher").setup { 43 - -- log level, you might consider using DEBUG or TRACE for debugging the plugin 44 - log_level = vim.log.levels.INFO, 45 - 46 - -- timeout for running internal commands 47 - timeout = 2000, 48 - 49 - commands = { 50 - go = "go", 51 - gomodifytags = "gomodifytags", 52 - gotests = "gotests", 53 - impl = "impl", 54 - iferr = "iferr", 55 - }, 56 - gotests = { 57 - -- gotests doesn't have template named "default" so this plugin uses "default" to set the default template 58 - template = "default", 59 - -- path to a directory containing custom test code templates 60 - template_dir = nil, 61 - -- switch table tests from using slice to map (with test name for the key) 62 - named = false, 63 - }, 64 - gotag = { 65 - transform = "snakecase", 66 - -- default tags to add to struct fields 67 - default_tag = "json", 68 - }, 69 - iferr = { 70 - -- choose a custom error message 71 - message = nil, 72 - }, 73 - } 74 - ``` 75 - 76 36 ## Features 77 - 78 - <!-- markdownlint-disable --> 79 37 80 38 <details> 81 39 <summary> ··· 227 185 ``` 228 186 </details> 229 187 230 - ## Contributing 188 + ## Configuration 231 189 232 - PRs are always welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md) 190 + > [!IMPORTANT] 191 + > 192 + > If you need more info look `:h gopher.nvim` 233 193 234 - ## Thanks 194 + **Take a look at default options (might be a bit outdated, look `:h gopher.nvim-config`)** 235 195 236 - - [go.nvim](https://github.com/ray-x/go.nvim) 237 - - [iferr](https://github.com/koron/iferr) 196 + ```lua 197 + require("gopher").setup { 198 + -- log level, you might consider using DEBUG or TRACE for debugging the plugin 199 + log_level = vim.log.levels.INFO, 200 + 201 + -- timeout for running internal commands 202 + timeout = 2000, 203 + 204 + commands = { 205 + go = "go", 206 + gomodifytags = "gomodifytags", 207 + gotests = "gotests", 208 + impl = "impl", 209 + iferr = "iferr", 210 + }, 211 + gotests = { 212 + -- gotests doesn't have template named "default" so this plugin uses "default" to set the default template 213 + template = "default", 214 + -- path to a directory containing custom test code templates 215 + template_dir = nil, 216 + -- switch table tests from using slice to map (with test name for the key) 217 + named = false, 218 + }, 219 + gotag = { 220 + transform = "snakecase", 221 + -- default tags to add to struct fields 222 + default_tag = "json", 223 + }, 224 + iferr = { 225 + -- choose a custom error message 226 + message = nil, 227 + }, 228 + } 229 + ``` 230 + 231 + ## Contributing 232 + 233 + PRs are always welcome. See [CONTRIBUTING.md](./CONTRIBUTING.md)