init: public
This commit is contained in:
13
modules/coding/editor/neovim/nvim/lua/langs/go.lua
Normal file
13
modules/coding/editor/neovim/nvim/lua/langs/go.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
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",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user