Closed G-Rath closed 3 years ago
I have this same error and it's intensely frustrating. You can adjust the behaviour like this I'm a MAC user so the Windows UI might be different
Preferences - Editor - Code Style - HashiCorp Configuration Language.
Click on Wrapping and Braces then Arrays - choose the option you want Click on Wrapping and Braces then Objects - choose the option you want Click on Other and then Align Properties set to On Equals
You can cut and paste your sample code into the sample window to see how it will be impacted by the changes.
If that doesn't work see if there is also a Terraform config option in the Code style tree as that might be where you need to set it
e.g Preferences - Editor - Code Style - Terraform config
@VladRassokhin any chance of getting this looked at? I'd be happy to take a crack at fixing it myself if I had the source code - if it helps, I have no issue signing docs like NDAs if that'd let me contribute.
I've updated formatting in 0.7.14, now it's more terraform fmt
-like:
Other :: Align Properties set to On Equals
Wrapping and Braces :: Arrays set to Wrap if long
Wrapping and Braces :: Objects set to Wrap if long
@VladRassokhin awesome thanks! I can confirm that formatting is working nicely, and that comments are no longer being pushed onto new lines - it does look like #269 is still present however.
As always let me know if I can help in anyway :)
Prerequisites
Installation details
Help->About->Copy to Clipboard
)Settings->Plugins
) 0.7.10terraform -v
) 0.12Terraform Configuration Files
Expected Behavior
Actual Behavior
Steps to Reproduce
Apply formatting to code provided above.