Visual Studio code - Elixir formatter not working, trying to use prettier instead

Viewed 1830

When pressing save VS.code is not formatting Elixir files, even after installing the elixir-ls extension https://github.com/elixir-lsp/elixir-ls

VS.Code is trying to use Prettier as the default formatter and the option format with doesn't show other formatters.

1 Answers

We can define different formatters based in the language we are using, under settings.json in user space we can specify the configurations for Elixir.

On my file I used:

  "[elixir]": {
    "editor.defaultFormatter": "JakeBecker.elixir-ls"
  },

My formatter starts with JakeBecker because I have the old plugin still installed in my system, this may or not have changed in the latest version.

Related