Skip to content

Commit

Permalink
plugins/gitsigns: add gitPackage option
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Feb 7, 2024
1 parent ff57525 commit eaa1736
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/git/gitsigns.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ with lib; let
in {
options.plugins.gitsigns = {
enable = mkEnableOption "gitsigns plugin";

package = helpers.mkPackageOption "gitsigns" pkgs.vimPlugins.gitsigns-nvim;

gitPackage = mkOption {
type = with types; nullOr package;
default = pkgs.git;
description = "Which package to use for git.";
};

signs = {
add = signOptions {
hl = "GitSignsAdd";
Expand Down Expand Up @@ -321,6 +329,9 @@ in {
in
mkIf cfg.enable {
extraPlugins = [cfg.package];

extraPackages = optional (cfg.gitPackage != null) cfg.gitPackage;

extraConfigLua = let
luaFnOrStrToObj = val:
if val == null
Expand Down

0 comments on commit eaa1736

Please sign in to comment.