From 07384c3887f6aadb0c1ec56b57faa2cc08d7c783 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Thu, 27 Mar 2025 19:57:01 +0100 Subject: [PATCH] language/elixir: migrate to conform/nvim-lint --- modules/plugins/languages/elixir.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/modules/plugins/languages/elixir.nix b/modules/plugins/languages/elixir.nix index f8f338b1..7b3a0256 100644 --- a/modules/plugins/languages/elixir.nix +++ b/modules/plugins/languages/elixir.nix @@ -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 {