stevearc / conform.nvim

Lightweight yet powerful formatter plugin for Neovim
MIT License
2.58k stars 136 forks source link

feat: set mix format --stdin-filename #389

Closed okkdev closed 2 months ago

okkdev commented 2 months ago

This is more of a fix than a feature. By adding the filename to --stdin-filename, mix format can detect the type of file. By default --stdin-filename is stdin.exs thus only allowing formatting of Elixir. This change is needed to allow formatting for mix format plugins. Most notably the heex template files which are used in the Phoenix Framework, which comes with a heex plugin by default. (https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.HTMLFormatter.html)

The mix format behaviour is documented here: https://hexdocs.pm/mix/main/Mix.Tasks.Format.html#module-task-specific-options

stevearc commented 2 months ago

LGTM thanks!