From 125ed74a423429e5af6796334b68400c78ac26b7 Mon Sep 17 00:00:00 2001 From: traxys Date: Fri, 30 Dec 2022 22:04:43 +0100 Subject: [PATCH] null-ls: Add gitsigns code action (#100) As this is not an external command but a plugin it adds the gitsigns plugin if enabled. --- plugins/null-ls/servers.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/null-ls/servers.nix b/plugins/null-ls/servers.nix index 48575425..da44c114 100644 --- a/plugins/null-ls/servers.nix +++ b/plugins/null-ls/servers.nix @@ -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; + }; }