From 38c140ee86b348840df850d01707cfde74a708c9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 4 Mar 2022 14:21:28 +0100 Subject: [PATCH] home: vim: don't use 'nixpkgs-fmt' with 'rnix' --- home/vim/plugin/settings/null-ls.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/home/vim/plugin/settings/null-ls.vim b/home/vim/plugin/settings/null-ls.vim index f76c451..6fc0e25 100644 --- a/home/vim/plugin/settings/null-ls.vim +++ b/home/vim/plugin/settings/null-ls.vim @@ -27,8 +27,10 @@ null_ls.register({ -- Nix null_ls.register({ null_ls.builtins.formatting.nixpkgs_fmt.with({ - -- Only used if available - condition = utils.is_executable_condition("nixpkgs-fmt"), + -- Only used if available, but prefer rnix if available + condition = function() + return utils.is_executable("nixpkgs-fmt") and not utils.is_executable("rnix-lsp") + end, }), })