nvim/after/plugin/go.lua

11 lines
255 B
Lua
Raw Normal View History

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