update README.md

This commit is contained in:
Alex Malykh 2023-11-26 00:50:16 +04:00
parent 1eef5a19d5
commit b11f10605e

View file

@ -20,6 +20,27 @@ use {
} }
``` ```
Lazy.nvim:
```lua
return {
"olexsmir/gopher.nvim",
build = function ()
vim.cmd(":GoInstallDeps")
-- make named tests works
vim.fn.jobstart("go install github.com/cweill/gotests/...@develop")
end,
config = function ()
require("gopher").setup({
gotests = {
template = "testify",
named = true
}
})
end
}
```
Also, run `TSInstall go` if `go` parser if isn't installed yet. Also, run `TSInstall go` if `go` parser if isn't installed yet.
## Config ## Config
@ -40,8 +61,6 @@ require("gopher").setup {
iferr = "iferr", iferr = "iferr",
}, },
gotests = { gotests = {
-- gotests tag to install from
tag = "@latest",
-- gotests doesn't have template named "default" so this plugin uses "default" to set the default template -- gotests doesn't have template named "default" so this plugin uses "default" to set the default template
template = "default", template = "default",
-- path to a directory containing custom test code templates -- path to a directory containing custom test code templates