question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Format-on-Save Stopped Working?

See original GitHub issue

Hi,

Recently my format-on-save stopped working and I’ve checked the docs however nothing new that I can see that I need to adjust in case of an update.

Here’s my tf-related config.

"[terraform]": {
  "editor.formatOnSave": true,
  "editor.tabSize": 4,
},

VSCode TF Version: v2.13.0

Anyone else having these issues or might know what I can adjust?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
radeksimkocommented, Jul 16, 2021

Thank you for that extra context @david-abarca - this is helpful!

Unfortunately it’s not the first time that I see a weird bug being caused by conflicts between multiple extensions claiming terraform language. I raised https://github.com/hashicorp/vscode-terraform/pull/693 and also created https://github.com/hashicorp/vscode-terraform/issues/692

btw. that third line (tabSize) you have there has no effect because Terraform itself (terraform fmt) is quite opinionated in how it does formatting and doesn’t allow for indentation style to be any different than prescribed (two spaces).

1reaction
radeksimkocommented, Jul 16, 2021

That new release should already be available in VS Code Marketplace (you may need to restart VS Code for it to show) - let me know if that resolved the issues.

Screenshot 2021-07-16 at 10 03 35

Read more comments on GitHub >

github_iconTop Results From Across the Web

Format on Save (prettier) stopped working with latest update
formatOnSave , the problem is prettier stopped working, even manual formatting (SHIFT + ALT + F) wasn't working, and it worked again after ......
Read more >
VS-Code Prettier Format On Save doesn't work
Try to make your code prettier manually by pressing CTRL + SHIFT + P >>> Format Document. If your file is being formatted...
Read more >
Prettier stopped working in VS Code
Sometimes Prettier suddenly stops working properly in VS Code. ... Type format on save into the search field and check if it is...
Read more >
prettier not working vscode Code Example
... format on save not working visual code vscode remote prettier not working properly prettier auto formatting in vscode not working format ...
Read more >
Prettier - Code Formatter not working on save (Help)
... is not working for me. I have tried saving the setting manually as well, but it is not… ... Prettier format on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found