forked from nvim-lua/kickstart.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgolang.lua
More file actions
70 lines (62 loc) · 2.09 KB
/
golang.lua
File metadata and controls
70 lines (62 loc) · 2.09 KB
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
62
63
64
65
66
67
68
69
70
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,
},
}