Refactor to use format_on_save
instead of a
...custom autocmd
This commit is contained in:
parent
79afe5b876
commit
690e61ee5e
|
@ -11,14 +11,9 @@ conform.setup {
|
||||||
terraform = { "terraform_fmt" },
|
terraform = { "terraform_fmt" },
|
||||||
yaml = { "yamlfmt" },
|
yaml = { "yamlfmt" },
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
format_on_save = {
|
||||||
callback = function(args)
|
|
||||||
conform.format {
|
|
||||||
bufnr = args.buf,
|
|
||||||
lsp_fallback = false,
|
lsp_fallback = false,
|
||||||
quiet = true,
|
quiet = true,
|
||||||
}
|
},
|
||||||
end,
|
}
|
||||||
})
|
|
||||||
|
|
Reference in a new issue