Am I the only one having problems with formatting of HEEX code since this update?
Basically, I’m on Erlang 26.0.2 using VS Code with latest ElixirLS (0.16.0).
*.heex files is ok, but the HEEX code of a component inside a
*.ex file (inside
~H""" ... """ doesn’t get formatted at all when using the “format on save” setting in VS Code. Using
mix format works though.
If I go back to 1.15.4, formatting on save is ok. Switch to 1.15.5 without changing anything else, doesn’t work anymore.
I can’t reproduce this. Does it work if you do
mix format on the CLI? Because if it does, then perhaps it is related to the editor integration.
Thanks for looking into it. Yes,
mix format works fine. I’ll try to debug it more, though I’m not really sure where to start at the moment.
Maybe it could be some editor setting, but without changing anything in the editor, I can switch between 1.15.5 and 1.15.4 and the old version works while the new version doesn’t. What’s weird is that it’s only the HEEX code in a H sigil that doesn’t get formatted. Everything in
.html.heex is formatted ok and the Elixir code in a component function outside the H sigil is formatted correctly too.