Closed Putinspudding closed 5 months ago
I do like trailing commas but the upstream elixir formatter does not support it and there is currently no plan. See https://github.com/elixir-lang/elixir/issues/13320 and https://github.com/elixir-lang/elixir/pull/7689#issuecomment-389588019. You can try your luck with https://github.com/marcandre/freedom_formatter but I never tested it with elixir-ls
Environment
Troubleshooting
Hi there,I've noticed that the formatter in ElixirLS doesn’t support trailing commas in lists, maps, or function definitions. When using so,it will be auto trimed when saving. Something like when I write this:
It will auto formatted as:
Trailing commas can make diffs cleaner and code maintenance easier. Is there any chance this feature or an settings option could be added in a future update?