I can see tflint running in the output, but it is no longer formatting the code on save
Also getting this behavior under 0.0.20. VScode details:

As a workaround, I figured out how to install the previous version:
This stackoverflow answer guides you through the process. The link to download the previous version is here.
I needed to rename the file with a proper vsix file extension and restart vscode afterward. Use the previous config values (now deprecated) and it should work again.
It looks like the terraform.formatOnSave setting was removed in favor of using the built-in editor.formatOnSave setting. If you want to enable format-on-save only for Terraform files, you can add the following to your user settings or workspace settings:
{
"[terraform]": {
"editor.formatOnSave": true
}
}
Actually the changelog mentions this: https://github.com/mauve/vscode-terraform/blob/master/CHANGELOG.md#0020.
I should have been more clear, @jacobwgillespie . That config was tried, the old style config was removed (no problems in settings.json), and under the new extension version the Terraform output console shows terraform fmt successfully running against files that continue to not get formatted. I think there's still a bug here unless there's something I've overlooked.
terraform.format: running 'terraform fmt' on '/Users/brandonoconnor/Development/git/foo/variables.tf'
terraform.format: Successful.
Ah, I see, gotcha. Well in that case, I can confirm that format-on-save is working for me with the above settings, vscode-terraform version 0.0.20, and VS Code 1.19.0. Do you have any other settings or extensions that might influence file formatting?
I just tried to reproduce this but cannot reproduce for editor.formatOnSave. Format on save works for me with the following setting:
"editor.formatOnSave": true
or
{
"[terraform]": {
"editor.formatOnSave": true
}
}
However format on save does not work with editor.autoSave which I think is by design in VSCode, at least this is what the settings documentation says:
// Format a file on save. A formatter must be available, the file must not be auto-saved, and editor must not be shutting down.
"editor.formatOnSave": false,
The formatter does not even seem to be invoked when editor.autoSave is true, however manually invoking save by Cmd+S or Ctrl+S.
@cludden: just a quick _fyi_: tflint is for linting, it has nothing with formatting to do. Formatting is done by terraform fmt, you should see the following output in the Output tab:
terraform.format: running 'terraform fmt' on '/Users/olenfalk/projects/vscode-terraform/templates/template.tf'
terraform.format: Successful.
@brandoconnor @cludden just to be clear do you have problems with the formatOnSave in general or is it the removal/breakage of the formatOnAutoSave feature which you are referring to?
Format on save is disabled when the save reason is auto:
@mauve I wasn't aware of the editor.formatOnSave setting.. that fixed it. thanks for clearing it up!
@cludden - Nope still not fixed here. Please reopen.
@mauve - I've verified that "editor.formatOnSave": true, editor.autoSave is non-existent (not even a valid configuration), and formatting is working on other file types. As mentioned in my previous comment, terraform.format shows the expected output on the correct file but nothing happens to the file. If I go to the terminal and terraform fmt manually, the file is formatted, but the extension is still not doing what it claims to be doing in the output. Any other settings to try or debugging that can be turned up?
broken for me as well...
EDIT: I reinstalled the extension and enabled both: "editor.formatOnSave": true & "terraform.format.enable": true.
That seems to work.
@brandoconnor ok I will take another look tonight, sorry for breaking your setup, if you can think of any other info which might narrow this down for me please keep commenting here.
Just tried once more with both settings as suggested on #46 and that wasn't successful.
Seems like uninstalling and re-installing the extension helps
Wish I could have that same story @mspaulding06 🤷♀️ . I've probably uninstalled and reinstalled the new version 10x in the course of troubleshooting.
Still doesn't work for me, i have re-installed the plugins several time and also set both "editor.formatOnSave": true and "terraform.format.enable": true
Hi guys, thanks for being patient:
Please test the new version and tell me if it still doesn't work for you:
The last version introduced usage of the correct extension APIs for registering formatting
providers. VSCode then automatically invokes the formatting provider on save if editor.formatOnSave has been specified. VSCode however does never invoke the formatting
provider if the save operation came from an auto-save event.
0.0.21 reintroduces the manual code which handled format on autosave instead of relying on
VSCode to perform those operations. The following configuration options have changes as result
of that:
terraform.format.enable: needs to be trueterraform.format.formatOnSave: needs to be trueterraform.format.ignoreExtensionsOnSave: can be used to exclude .tfvars for example from autosave formattingThe global setting: editor.formatOnSave should be false for Terraform files and the
extension contributes that default configuration. Please verify that you do not have
conflicting configuration, by removing the following setting if you have it:
"[terraform]": {
"editor.formatOnSave": true
}
The configuration editor.formatOnSave will have the correct setting contributed by Terraform.
Most helpful comment
It looks like the
terraform.formatOnSavesetting was removed in favor of using the built-ineditor.formatOnSavesetting. If you want to enable format-on-save only for Terraform files, you can add the following to your user settings or workspace settings: