stevearc / conform.nvim

Lightweight yet powerful formatter plugin for Neovim
MIT License
2.72k stars 142 forks source link

Do not output colors in terraform_fmt #354

Closed senilio closed 4 months ago

senilio commented 4 months ago

Currently the terraform_fmt formatter outputs colors, resulting in "bad" characters in conform.log.

Example:

22:03:46[ERROR] Formatter 'terraform_fmt' error: ╷
│ Error: Attribute redefined
│ 
│   on <stdin> line 3, in resource "test":
│    3:    hello = 123
│ 
│ The argument "hello" was already set at <stdin>:2,3-8. Each argument may be
│ set only once.
╵


Adding the -no-color argument to terraform fmt will result in a more readable output:

22:13:44[ERROR] Formatter 'terraform_fmt' error: 
Error: Attribute redefined

  on <stdin> line 3, in resource "test":
   3:   hello = 123

The argument "hello" was already set at <stdin>:2,3-8. Each argument may be
set only once.

I know this can be added via config, but IMO this should be the default behaviour.

stevearc commented 4 months ago

Thanks for the fix!