Open nlowe opened 5 years ago
For now it's recommended to configure terraform fmt
file watcher and also performing it before committing changes.
Ah, I didn't know that was a thing. That's exactly what I'm looking for!
I have the terraform fmt
file watcher running but this bug is still very annoying. Is there a timeline on a fix?
This is annoying me as well! The problem with using terraform fmt
is that it formats a whole directory, rather than the specific file you're working with?
Also, I found that using terraform fmt
, the closing ']' stays on the same line as the last element as well! Seems odd, but there you go.
Prerequisites
Installation details
Help->About->Copy to Clipboard
)Settings->Plugins
)v0.6.13
terraform -v
)Terraform v0.11.11
Terraform Configuration Files
Expected Behavior
When the
default
array (or any array in general) gets too long andChop down if long
is set in formatting settings, or ifWrap Always
is set in formatting settings, I expect the above code to be reformatted as follows:Actual Behavior
The code is reformatted as follows:
Note the closing
]
stays on the same line as the last element.Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Wrapping and Braces
tab, setArrays
toWrap Always
.vars.tf
Ctrl
+Alt
+Shift
+L
)Notes
Other languages have the ability to control where the closing
]
gets places. For example, Javascript:I found this because the rest of my team works with terraform manifests in VSCode. I was trying to get the formatting to match.