all repos

gopher.nvim @ e49f3fa

Minimalistic plugin for Go development

gopher.nvim/lua/gopher/config.lua(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
---@class gopher.Config
local config = {}

---@class gopher.Config
---@field commands gopher.ConfigCommands
local default_config = {
  ---@class gopher.ConfigCommands
  commands = {
    go = "go",
    gomodifytags = "gomodifytags",
    gotests = "gotests",
    impl = "impl",
    iferr = "iferr",
    dlv = "dlv",
  },
}

---@param user_config gopher.Config|nil
function config.setup(user_config)
  config = vim.tbl_deep_extend("force", {}, default_config, user_config or {})
end

-- setup ifself, needs for ability to get
-- default config without calling .setup()
config.setup()

return config