Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Format only on manual save' mode #112

Closed
bitfield opened this issue Jul 26, 2018 · 1 comment
Closed

'Format only on manual save' mode #112

bitfield opened this issue Jul 26, 2018 · 1 comment

Comments

@bitfield
Copy link

I'm having a little trouble getting vscode-terraform to work the way I want. My point of comparison is vscode-go; with that extension, files are formatted every time you save them manually, but not on auto-save.

In Terraform, though, with editor.formatOnSave enabled, the file is reformatted on an auto-save. This is really disconcerting when you open a block prior to typing a line of code, pause to think about it, and suddenly the block you were in disappears.

Is there any combination of settings which will run the formatter only when I manually save the file, even if I have auto-save enabled? Or is this a feature of vscode-go which doesn't exist in vscode-terraform?

(I don't want to have to format the document manually, per the suggestion to #60. It's easy to forget to do that and check in a busted file. You can't do that if it's formatted on save.)

@mauve
Copy link
Contributor

mauve commented Jul 26, 2018

you are right, I have been meaning to kill the format on auto-save feature for quite some time but the backlash was relatively large last time I tried, but just the last couple of days I have been getting several bug reports about breaking other functionality.

in the next release it goes away :)

thanks for using my plugin, and thanks for finally giving me a good reason to kill this feature I do really do not like :)

I am currently preparing a new release, I hope to have this fixed in the same one, hopefully released over the weekend.

@mauve mauve closed this as completed in e888a53 Jul 27, 2018
mauve added a commit that referenced this issue Jul 28, 2018
Closes #48
Closes #107
Closes #102
Closes #103
Closes #112
Closes #106
@ghost ghost locked and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants