language/elixir: migrate to conform/nvim-lint

This commit is contained in:
Ching Pei Yang 2025-03-27 19:57:01 +01:00
parent 459e97dab7
commit 07384c3887
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -38,14 +38,9 @@
formats = {
mix = {
package = pkgs.elixir;
nullConfig = ''
table.insert(
ls_sources,
null_ls.builtins.formatting.mix.with({
command = "${cfg.format.package}/bin/mix",
})
)
'';
config = {
command = "${cfg.format.package}/bin/mix";
};
};
};
in {
@ -107,8 +102,12 @@ in {
})
(mkIf cfg.format.enable {
vim.lsp.null-ls.enable = true;
vim.lsp.null-ls.sources.elixir-format = formats.${cfg.format.type}.nullConfig;
vim.formatter.conform-nvim = {
enable = true;
setupOpts.formatters_by_ft.elixir = [cfg.format.type];
setupOpts.formatters.${cfg.format.type} =
formats.${cfg.format.type}.config;
};
})
(mkIf cfg.elixir-tools.enable {