mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 08:53:28 +02:00
plugins/gitsigns: add gitPackage option
This commit is contained in:
parent
ff57525a64
commit
eaa1736151
1 changed files with 11 additions and 0 deletions
|
@ -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";
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue