win-nvim/after/plugin/go.lua

12 lines
254 B
Lua
Raw Normal View History

2024-11-10 11:23:44 +00:00
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require('go.format').goimports()
end,
group = format_sync_grp,
})
require('go').setup()