You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On second thoughts, there is not much that terraform-format-buffer can do because it uses terraform fmt internally. And it does not appear that terraform fmt accepts custom indentation levels at the moment.
However, one alternative could be to readjust the indentation after terraform fmt has done its magic. Thoughts?
I did what you suggested in the second comment. If the level is different from 2, after replacing the buffer with the formatted text I run indent-region on the entire buffer which will re-indent to 4 or whatever you set.
Steps to reproduce:
terraform-indent-level
to 4 (default is 2)terraform-format-buffer
on a.tf
fileThe mode indents the buffer at level 2 instead of 4.
This will also fix
terraform-format-on-save
.The text was updated successfully, but these errors were encountered: