feat: add elixir file formatting (#458)

This commit is contained in:
Ryan Winchester 2025-06-27 11:15:11 -03:00 committed by GitHub
parent dbb6e55226
commit 334161a30e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,5 +132,32 @@ export namespace Format {
}
},
},
{
name: "mix format",
command: ["mix", "format", "$FILE"],
extensions: [
".ex",
".exs",
".eex",
".heex",
".leex",
".neex",
".sface",
],
async enabled() {
try {
const proc = Bun.spawn({
cmd: ["mix", "--version"],
cwd: App.info().path.cwd,
stdout: "ignore",
stderr: "ignore",
})
const exit = await proc.exited
return exit === 0
} catch {
return false
}
},
},
]
}