vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

Custom `dot-formatter` location isn't respected by extension

Open kieraneglin opened this issue 1 year ago • 1 comments

Is this the right repo?

This is specifically a request for this repo

Environment

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] Elixir 1.17.0 (compiled with Erlang/OTP 25)
  • VSCode ElixirLS version: 0.22.0
  • Operating System Version: darwin 23.5.0

Troubleshooting

  • [x] Restart your editor (which will restart ElixirLS) sometimes fixes issues
  • [x] Stop your editor, remove the entire .elixir_ls directory, then restart your editor

Setup

  • Move .formatter.exs into a directory like tooling/.formatter.exs
  • Update your mix aliases to overwrite mix format like:

defp aliases do
  [
    format: "format --dot-formatter=tooling/.formatter.exs",
    # ...
  ]
end
  • Attempt to format a file via the extension

Expected behaviour

--dot-formatter argument is respected (or, if not respected, is configurable)

Actual behaviour

--dot-formatter argument is not respected or configurable

Spitballing

I'm not sure if this is possible, but it'd rule if you could specify the exact formatting command to run in your VS Code settings and the format task would use that command instead. The default value would be mix format

kieraneglin avatar Jun 17 '24 20:06 kieraneglin