-
Notifications
You must be signed in to change notification settings - Fork 106
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
Formatting on save does not work with heex files. #242
Comments
I have the same issue, error is
|
Just confirmed: latest master version of this repo + latest master of elixir-ls suffers from same issue. |
Same for me
I installed latest elixir 1.13.4 and liveview. Automatic formatting in vscode works great for Not sure if related, but I noticed in the elixir ls output that it says is using version 0.8.2
But there is not release with that number in the changelog as it jumps from 0.8.1 to 0.9.0 so maybe that is just the latest release |
I see the same version mismatch, but I'm not sure if it matters, even with the custom build (everything bumped to master), where I do see the correct version
it doesn't work. |
Yeah, I tried that as well (compiling from master). Error remains |
I tried reproducing the error while running the formatter in the command line. I installed with asdf a different elixir version (1.12.0) and then I get a similar syntax error when formatting a
so maybe is related to the plugin using an older Elixir version, but what I don't get, if that is the case, how it does work on |
As a workaround, you can install the runonsave extension for VSCode and configure that to run Sadly then "save without formatting" won't work. So it would be nice to get this working with the extension directly. |
I wanted to offer an alternative solution that worked for me. I installed another VSCode extension called Elixir Mix Formatter and set this to be my default formatter for elixir and heex files which seems to work as expected. |
make sure you have the latest version of Elixir, just run asdf install or brew uprgrade that worked for me |
elixir-lsp/elixir-ls#690 just got merged... 🥳 |
Yeah got this working with the VS Code extension by pulling Edit: to be clear now formats all of |
Just in case anybody wonders how to compile the current master, try this little snippet: (Remember to change the version to the current VSCode extension version. Currently git clone --depth 1 --branch master https://github.com/elixir-lsp/elixir-ls.git ~/elixir_ls
cd ~/elixir_ls
mix deps.get
mix elixir_ls.release -o ~/.vscode/extensions/jakebecker.elixir-ls-0.11.0/elixir-ls-release/ |
For everyone tracking this, note |
Fixed in v0.11 |
The auto formatter does not work on
heex
files, even after setting up the configuration in my project correctly and adding the elixir-ls plugin as the default formatter insettings.json
. If I run amix format
in the terminal, theheex
files are formatted.Is this expected? Is it something to implement on the vscode-elixir-ls level?
Environment
The text was updated successfully, but these errors were encountered: