formateo automatico para go
This commit is contained in:
parent
5afee66cfe
commit
f036fe3648
@ -1,2 +1,16 @@
|
||||
require("serxoz")
|
||||
require('serxoz.packer')
|
||||
|
||||
-- autoformat
|
||||
vim.api.nvim_create_augroup("AutoFormat", {})
|
||||
vim.api.nvim_create_autocmd(
|
||||
"BufWritePost",
|
||||
{
|
||||
pattern = "*.go",
|
||||
group = "AutoFormat",
|
||||
callback = function()
|
||||
vim.cmd("silent !go fmt %")
|
||||
vim.cmd("edit")
|
||||
end,
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user