Gusti
ElixisLS in VS Code does not format *.ex, *.exs files
Hi,
I cannot get VS Code with the elixir-ls extension to format my code.
Only thru “mix format” command.
Environment:
Erlang/OTP 23 [erts-11.0.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.11.3 (compiled with Erlang/OTP 23)
elixir-lsp.elixir-ls-0.6.2
I even tried after recompiling elixirls with my current elixir installation.
I have configured VS Code settings.json, to specify ‘elixir-lsp.elixir-ls’ as the default formatter.
Any ideas what other things I need to tweak in order for it to work?
Best regards,
Gusti.
Most Liked
axelson
Hi
! Are you running the “Format Command” in VSCode (defaults to alt+shift+f)?
If that isn’t working then try running through the debugging steps: https://github.com/elixir-lsp/vscode-elixir-ls/#debugging
Sebb
Beware, that the code is not formatted if there are syntax errors.
mattbaker
FWIW I’ve been having trouble too (formatter.exs seems to not be respected) and rolled back to the previous version, I just haven’t been able to gather enough details to post a helpful issue yet
It doesn’t seem related to the existing issue about formatter.exs during compilation, but I need to double check first.








