-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgo.lua
More file actions
29 lines (29 loc) · 959 Bytes
/
go.lua
File metadata and controls
29 lines (29 loc) · 959 Bytes
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
---@type LazyPluginSpec
return {
-- Go tooling support
"olexsmir/gopher.nvim",
ft = "go",
config =
---@param _ LazyPlugin
---@param opts table
function(_, opts)
require("gopher").setup(opts)
local grp = vim.api.nvim_create_augroup("Gopher", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
group = grp,
pattern = { "go" },
desc = "Keymaps gopher (buffer-local)",
callback =
---@param ev vim.api.keyset.create_autocmd.callback_args
function(ev)
-- Buffer-local keymaps
local keymaps = require("core.keymaps")
local util = require("core.util")
util.map_keys(keymaps.go, { buffer = ev.buf })
end,
})
end,
build = function()
pcall(vim.api.nvim_cmd, { cmd = "GoInstallDeps" }, { output = false })
end,
}