diff options
author | Hussein Al Abry <hussein@zidhuss.tech> | 2024-03-01 08:23:02 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 20:23:02 -0800 |
commit | 68dad93cde8d8b71e53d07ac43029d0fca06bf26 (patch) | |
tree | 3ad5c95c7c1d939347053c8f65d9582d54aac069 | |
parent | 192a6d2ddace343f1840a8f72efe2315bd392243 (diff) |
feat: add OpenTofu formatter (#313)
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lua/conform/formatters/tofu_fmt.lua | 9 |
2 files changed, 10 insertions, 0 deletions
@@ -289,6 +289,7 @@ You can view this list in vim with `:help conform-formatters` - [terraform_fmt](https://www.terraform.io/docs/cli/commands/fmt.html) - The terraform-fmt command rewrites `terraform` configuration files to a canonical format and style. - [terragrunt_hclfmt](https://terragrunt.gruntwork.io/docs/reference/cli-options/#hclfmt) - Format hcl files into a canonical format. - [tlint](https://github.com/tighten/tlint) - Tighten linter for Laravel conventions with support for auto-formatting. +- [tofu_fmt](https://opentofu.org/docs/cli/commands/fmt/) - The tofu-fmt command rewrites OpenTofu configuration files to a canonical format and style. - [trim_newlines](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim new lines with awk. - [trim_whitespace](https://www.gnu.org/software/gawk/manual/gawk.html) - Trim whitespaces with awk. - [twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) - Automatically fix Twig Coding Standards issues diff --git a/lua/conform/formatters/tofu_fmt.lua b/lua/conform/formatters/tofu_fmt.lua new file mode 100644 index 0000000..00a2108 --- /dev/null +++ b/lua/conform/formatters/tofu_fmt.lua @@ -0,0 +1,9 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://opentofu.org/docs/cli/commands/fmt/", + description = "The tofu-fmt command rewrites OpenTofu configuration files to a canonical format and style.", + }, + command = "tofu", + args = { "fmt", "-" }, +} |