hashivim/vim-terraform

Question - TerraformFMT

Aur0nd opened this issue · 3 comments

Hi there,

I was wondering if there is a way to terraformFMT on :w! or something similar? that'd be a life saver.

for anyone reading this, add the below in your init.vim
let g:terraform_fmt_on_save = 1

I put this in my

  • ~/.config/nvim/after/ftplugin/terraform.vim

but it doesn't seem to be working for me. The contents of my file are:

let g:terraform_fmt_on_save=1

But no dice for me. WHen I run :scriptnames I do see that my terraform.vim file is loaded. I can also run :TerraformFmt manually though.

Made my own issue: #175