23 lines
493 B
Lua
23 lines
493 B
Lua
require("conform").setup({
|
|
format_on_save = {
|
|
-- These options will be passed to conform.format()
|
|
timeout_ms = 500,
|
|
lsp_format = "never",
|
|
},
|
|
formatters = {
|
|
terraform = {
|
|
inherit = false,
|
|
command = "tofu",
|
|
args = { "fmt", "-" },
|
|
stdin = true,
|
|
},
|
|
},
|
|
formatters_by_ft = {
|
|
go = { "gofmt" },
|
|
nix = { "alejandra" },
|
|
sh = { "shfmt" },
|
|
terraform = { "terraform" },
|
|
yaml = {"yamlfmt"},
|
|
["_"] = { "trim_whitespace" },
|
|
}
|
|
})
|