Vscode-elixir is not able to format my file

Hi guys,

Wonder if anyone has experience this

I ran mix new test to create a totally new repo. I am able to format fine using mix format however in vscode i get this error when i try to format document

I tried to see whats wrong from vscode developer console. There wasn’t any output when this happened

I am using the following plugin (i cannot use elixirLS because i have to use elixir 1.6)

I am stuck with this for a while and ran out of ideas. Please help

I’m not sure about the formatter plugin and how it works. But the issue #5 suggests, that it is sensitive to altered pathes. I assume, that you use asdf-vm or any other version manager, which is configured only from the shell, but at the same time you probably started VScode from a graphical launcher.

Also I’d suggest to drop vscode-elixir, its last update was three years ago, since then a lot in elixir changed and the inner workings in the plugin haven’t been updated to follow up with these changes. This plugin is considered mostly defunct.

Perhaps the easiest thing to do is, to remove both plugins and only install elixir-ls, it combines syntax color, completion and formatting. It uses the elixir-lsp as completion and formatting backend.

Thanks for helping to provide some ideas. But i have to use elixir 1.6 and elixir-ls requires at least 1.7. Anyways i switched to using intellij for now. It just works.

1.6 as well as 1.7 are not supported anymore with bugfixes and security releases. 1.8 will not supported much longer than 2 or 3 months from now, as the rule of thumb for elixir is the most recent release plus 2 minor releases before are supported.

You should urge an update of your elixir version. The longer you wait, the harder it will become to catch up.

Anyway, your formatting problem might be solvable, by starting vscode from the terminal after cding into your project.