plugins/null-ls: fix gitsigns, add test for sources

This commit is contained in:
Gaetan Lepage 2023-05-21 17:19:38 +02:00 committed by Gaétan Lepage
parent 2da04fa4ad
commit 82c328e6cd
2 changed files with 28 additions and 1 deletions

View file

@ -82,8 +82,10 @@ in {
config = let
cfg = config.plugins.null-ls;
gitsignsEnabled = cfg.sources.code_actions.gitsigns.enable;
in
lib.mkIf cfg.enable {
plugins.gitsigns.enable = lib.mkIf (cfg.sources.code_actions.gitsigns.enable) true;
plugins.gitsigns.enable = lib.mkIf gitsignsEnabled true;
extraPackages = lib.optional gitsignsEnabled pkgs.git;
};
}

View file

@ -34,6 +34,31 @@
shouldAttach = null;
tempDir = null;
updateInInsert = false;
sources = {
code_actions = {
gitsigns.enable = true;
shellcheck.enable = true;
};
diagnostics = {
cppcheck.enable = true;
flake8.enable = true;
gitlint.enable = true;
shellcheck.enable = true;
};
formatting = {
alejandra.enable = true;
black.enable = true;
cbfmt.enable = true;
fnlfmt.enable = true;
fourmolu.enable = true;
nixfmt.enable = true;
phpcbf.enable = true;
prettier.enable = true;
shfmt.enable = true;
stylua.enable = true;
taplo.enable = true;
};
};
};
};
}