mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-22 17:03:31 +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 {
|
in {
|
||||||
options.plugins.gitsigns = {
|
options.plugins.gitsigns = {
|
||||||
enable = mkEnableOption "gitsigns plugin";
|
enable = mkEnableOption "gitsigns plugin";
|
||||||
|
|
||||||
package = helpers.mkPackageOption "gitsigns" pkgs.vimPlugins.gitsigns-nvim;
|
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 = {
|
signs = {
|
||||||
add = signOptions {
|
add = signOptions {
|
||||||
hl = "GitSignsAdd";
|
hl = "GitSignsAdd";
|
||||||
|
@ -321,6 +329,9 @@ in {
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [cfg.package];
|
||||||
|
|
||||||
|
extraPackages = optional (cfg.gitPackage != null) cfg.gitPackage;
|
||||||
|
|
||||||
extraConfigLua = let
|
extraConfigLua = let
|
||||||
luaFnOrStrToObj = val:
|
luaFnOrStrToObj = val:
|
||||||
if val == null
|
if val == null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue