71 lines
2.1 KiB
Lua
71 lines
2.1 KiB
Lua
return {
|
|
{
|
|
'olexsmir/gopher.nvim',
|
|
ft = 'go',
|
|
-- branch = "develop"
|
|
-- (optional) updates the plugin's dependencies on each update
|
|
build = function()
|
|
vim.cmd.GoInstallDeps()
|
|
end,
|
|
---@module "gopher"
|
|
---@type gopher.Config
|
|
opts = {},
|
|
config = function()
|
|
require('gopher').setup {
|
|
-- log level, you might consider using DEBUG or TRACE for debugging the plugin
|
|
log_level = vim.log.levels.INFO,
|
|
|
|
-- timeout for running internal commands
|
|
timeout = 2000,
|
|
|
|
-- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync)
|
|
installer_timeout = 999999,
|
|
|
|
-- user specified paths to binaries
|
|
commands = {
|
|
go = 'go',
|
|
gomodifytags = 'gomodifytags',
|
|
gotests = 'gotests',
|
|
impl = 'impl',
|
|
iferr = 'iferr',
|
|
},
|
|
gotests = {
|
|
-- a default template that gotess will use.
|
|
-- gotets doesn't have template named `default`, we use it to represent absence of the provided template.
|
|
template = 'default',
|
|
|
|
-- path to a directory containing custom test code templates
|
|
template_dir = nil,
|
|
|
|
-- use named tests(map with test name as key) in table tests(slice of structs by default)
|
|
named = false,
|
|
},
|
|
gotag = {
|
|
transform = 'snakecase',
|
|
|
|
-- default tags to add to struct fields
|
|
default_tag = 'json',
|
|
|
|
-- default tag option added struct fields, set to nil to disable
|
|
-- e.g: `option = "json=omitempty,xml=omitempty`
|
|
option = nil,
|
|
},
|
|
iferr = {
|
|
-- choose a custom error message, nil to use default
|
|
-- e.g: `message = 'fmt.Errorf("failed to %w", err)'`
|
|
message = nil,
|
|
},
|
|
json2go = {
|
|
-- command used to open interactive input.
|
|
-- e.g: `split`, `botright split`, `tabnew`
|
|
interactive_cmd = 'vsplit',
|
|
|
|
-- name of autogenerated struct
|
|
-- e.g: "MySuperCoolName"
|
|
type_name = nil,
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
}
|