null-ls: Add gitsigns code action (#100)

As this is not an external command but a plugin it adds the gitsigns
plugin if enabled.
This commit is contained in:
traxys 2022-12-30 22:04:43 +01:00 committed by GitHub
parent 30fc8b4f43
commit 125ed74a42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,9 @@
let
helpers = import ./helpers.nix args;
serverData = {
code_actions = { };
code_actions = {
gitsigns = { };
};
completion = { };
diagnostics = {
flake8 = {
@ -54,4 +56,11 @@ let
in
{
imports = lib.lists.map (helpers.mkServer) dataFlattened;
config = let
cfg = config.plugins.null-ls;
in
lib.mkIf cfg.enable {
plugins.gitsigns.enable = lib.mkIf (cfg.sources.code_actions.gitsigns.enable) true;
};
}