FYI for Anyone with VSCode who updated to 1.20.1

FYI for anyone using VSCode elm extension, elm-format command had a breaking change, the setting for formatOnSave has changed from

“elm.formatOnSave”: true

to

“editor.formatOnSave”: true

Cheers!

8 Likes

And for the ones who don’t want to have formatOnSave on at all time, you can activate it only in the workspace settings or at a language level (https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings)

1 Like

I’ve had some issues with this since the setting was renamed. Using webpack-dev-server, I have to manually command my editor to format code after saving source changes. I wonder if anyone have had similar issues?

I’m having that exact issue. Format on save shows an error on the task bar, but manually formatting works fine.

I’m a contributor on this extension and I’m trying to investigate this as this also happen on my Windows machine, but not on Linux. It would help to know what kind of operating system you are running.

From my initial debugging, the file is formatted correctly in stdout, but seems to be discarded after beeing replaced.

I’m not seeing any error in the task bar - what is the error message?

1 Like

It seems to have fixed itself. ¯\(ツ)

I’m running the latest vscode release on windows10. I am on my phone right now, but I can give you a more thorough report later if that helps?

There is now a fix for this issue in the latest VSCode insider. This allows you to set a formatOnSaveTimeout value to override the default 750ms timeout.

Use the setting like this:
“editor.formatOnSaveTimeout”: 1500

2 Likes