Skip to content

Custom dot-formatter location isn't respected by extension #421

Open
@kieraneglin

Description

@kieraneglin

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

  • Restart your editor (which will restart ElixirLS) sometimes fixes issues
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions