From 6836930ed5a0ec6e8bb531116c62cc10f475c298 Mon Sep 17 00:00:00 2001 From: Ethan Gunderson Date: Wed, 4 Oct 2023 10:43:07 -0500 Subject: fix: support for mix format (#107) * add support for mix format * split command and set cwd --- lua/conform/formatters/mix.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lua/conform/formatters/mix.lua (limited to 'lua/conform/formatters') diff --git a/lua/conform/formatters/mix.lua b/lua/conform/formatters/mix.lua new file mode 100644 index 0000000..fb21db6 --- /dev/null +++ b/lua/conform/formatters/mix.lua @@ -0,0 +1,13 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://hexdocs.pm/mix/main/Mix.Tasks.Format.html", + description = "Format Elixir files using the mix format command.", + }, + command = "mix", + args = { "format", "-" }, + cwd = require("conform.util").root_file({ + ".formatter.exs", + "mix.exs", + }), +} -- cgit v1.2.3-70-g09d2