plugins/lualine: use gitPackage

This commit is contained in:
Austin Horstman 2024-08-29 11:21:04 -05:00
parent 831c814bb3
commit ce6573424d
No known key found for this signature in database
2 changed files with 13 additions and 1 deletions

View file

@ -108,6 +108,11 @@ in
package = helpers.mkPluginPackageOption "lualine" pkgs.vimPlugins.lualine-nvim; package = helpers.mkPluginPackageOption "lualine" pkgs.vimPlugins.lualine-nvim;
gitPackage = helpers.mkPackageOption {
name = "git";
default = pkgs.git;
};
iconsEnabled = mkOption { iconsEnabled = mkOption {
type = types.bool; type = types.bool;
description = "Whether to enable/disable icons for all components."; description = "Whether to enable/disable icons for all components.";
@ -245,7 +250,7 @@ in
in in
mkIf cfg.enable { mkIf cfg.enable {
extraPlugins = [ cfg.package ] ++ (optional cfg.iconsEnabled pkgs.vimPlugins.nvim-web-devicons); extraPlugins = [ cfg.package ] ++ (optional cfg.iconsEnabled pkgs.vimPlugins.nvim-web-devicons);
extraPackages = [ pkgs.git ]; extraPackages = [ cfg.gitPackage ];
extraConfigLua = ''require("lualine").setup(${helpers.toLuaObject setupOptions})''; extraConfigLua = ''require("lualine").setup(${helpers.toLuaObject setupOptions})'';
}; };
} }

View file

@ -114,4 +114,11 @@
extensions = [ "nvim-tree" ]; extensions = [ "nvim-tree" ];
}; };
}; };
no-packages = {
plugins.lualine = {
enable = true;
gitPackage = null;
};
};
} }