Files
imxyy_soope_ 53e15c2324 chore(nvim): a lot
format, fix nvim-tree startup, update telescope, drop unused plugins
2025-06-14 19:47:08 +08:00

13 lines
356 B
Lua

vim.api.nvim_create_augroup("Go", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = { "*.go" },
desc = "auto format Go files",
callback = function()
vim.lsp.buf.format()
-- vim.fn.system("go fmt " .. vim.fn.expand("%:p"))
-- vim.fn.system("goimports -w " .. vim.fn.expand("%:p"))
-- vim.cmd("edit")
end,
group = "Go",
})