stevearc / conform.nvim

Lightweight yet powerful formatter plugin for Neovim
MIT License
2.58k stars 136 forks source link

Add a generic hcl formatter (hclfmt) #402

Closed jonasohland closed 2 months ago

jonasohland commented 2 months ago

Adds a generic formatter for hcl files.

I realize that there are already 2 formatters for hcl files defined in this repo, but to use either one of them, you need to have the specific tool installed (terraform or packer).

Meant to be used with the hclfmt binary that is built from the hcl project. This is also the one that can be obtained with mason: registry link.

Formats input from stdin and writes to stdout.

stevearc commented 2 months ago

Thanks for the PR!