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

Add support for configuring what task to run on for formatting

Open olivermt opened this issue 3 years ago • 2 comments

Is this the right repo?

Yep

Environment

Most of this can be filled out by running the VSCode command (by default bound to Ctrl+Shift+P) "ElixirLS: Copy Debug Info"

  • Elixir & Erlang versions (elixir --version): all
  • VSCode ElixirLS version: all
  • Operating System Version: all

Troubleshooting

N/A

Crash report template

N/A

Problem description

We now have a surface formatter that can format surface components. It runs as its own task, and ideally we could just alias format to do format + surface.format. Since vscode doesn't use the shell command for mix however, the mix alias doesn't work.

The easiest way to solve this as I can see it is to add a config option for which task to call, then we can just make a full fledged task that calls format + surface.format (or even add an option to surface.format to also run the normal formatter against the same file).

olivermt avatar Feb 18 '21 14:02 olivermt

Apparently, format will be expanded to allow for plugin-formatters, so this will solve itself with time.

olivermt avatar Feb 18 '21 15:02 olivermt

I was a bit quick on the trigger, as it might not be possible to auto-include this, so such a configuration change might be very sensible after all.

olivermt avatar Feb 18 '21 15:02 olivermt

AFAIK this has been covered by support mix formatter_for_file which landed in v0.11

lukaszsamson avatar Sep 29 '22 19:09 lukaszsamson