feat(conform): add terraform fmt
This commit is contained in:
parent
8a58f7fe3c
commit
5ca4f0ef5b
1 changed files with 9 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ return {
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
xml = { "xmlformatter" },
|
xml = { "xmlformatter" },
|
||||||
svg = { "xmlformatter" },
|
svg = { "xmlformatter" },
|
||||||
|
terraform = { "tfmt" },
|
||||||
javascript = { "biome", "prettier" },
|
javascript = { "biome", "prettier" },
|
||||||
javascriptreact = { "biome", "prettier" },
|
javascriptreact = { "biome", "prettier" },
|
||||||
typescript = { "biome", "prettier" },
|
typescript = { "biome", "prettier" },
|
||||||
|
|
@ -20,6 +21,14 @@ return {
|
||||||
["*"] = { "trim_whitespace" },
|
["*"] = { "trim_whitespace" },
|
||||||
},
|
},
|
||||||
formatters = {
|
formatters = {
|
||||||
|
tfmt = {
|
||||||
|
condition = function()
|
||||||
|
return vim.bo.filetype == "terraform"
|
||||||
|
end,
|
||||||
|
command = "terraform",
|
||||||
|
args = { "fmt", "$FILENAME" },
|
||||||
|
stdin = false,
|
||||||
|
},
|
||||||
biome = {
|
biome = {
|
||||||
condition = function()
|
condition = function()
|
||||||
return vim.uv.fs_realpath("biome.json") ~= nil
|
return vim.uv.fs_realpath("biome.json") ~= nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue