Skip to content

How does this format the file? #224

Answered by axelson
cvkmohan asked this question in Q&A
Jan 20, 2022 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

Hi! ElixirLS doesn't call mix format directly for two main reasons:

  • It would be very slow because we'd have to wait for the BEAM to startup
  • We want to support undo/redo via LSP

Here's the code that does the formatting: https://github.com/elixir-lsp/elixir-ls/blob/1f1922db65f0ee7b1d2e754dffdba487ae3f2f01/apps/language_server/lib/language_server/providers/formatting.ex

ElixirLS hasn't added support for this new Elixir 1.13 feature yet so I've create a feature request for this: elixir-lsp/elixir-ls#660

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@msaraiva
Comment options

@zachdaniel
Comment options

@zachdaniel
Comment options

@msaraiva
Comment options

@zachdaniel
Comment options

Answer selected by axelson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants