chore(neovim): update formatter configurations
This commit is contained in:
parent
97de9851ed
commit
d563805909
2 changed files with 13 additions and 3 deletions
|
@ -71,7 +71,7 @@ in
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
nixfmt-rfc-style
|
alejandra
|
||||||
shfmt
|
shfmt
|
||||||
yamlfmt
|
yamlfmt
|
||||||
];
|
];
|
||||||
|
|
|
@ -4,10 +4,20 @@ require("conform").setup({
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_format = "never",
|
lsp_format = "never",
|
||||||
},
|
},
|
||||||
|
formatters = {
|
||||||
|
terraform = {
|
||||||
|
inherit = false,
|
||||||
|
command = "tofu",
|
||||||
|
args = { "fmt", "-" },
|
||||||
|
stdin = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
yaml = {"yamlfmt"},
|
|
||||||
sh = { "shfmt" },
|
|
||||||
go = { "gofmt" },
|
go = { "gofmt" },
|
||||||
|
nix = { "alejandra" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
terraform = { "terraform" },
|
||||||
|
yaml = {"yamlfmt"},
|
||||||
["_"] = { "trim_whitespace" },
|
["_"] = { "trim_whitespace" },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue