mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 02:59:00 +02:00
plugins/lualine: add nvim-web-devicons to extraPlugins (#197)
This commit is contained in:
parent
55b302c268
commit
7f23304c3d
1 changed files with 10 additions and 1 deletions
|
@ -86,6 +86,12 @@ in {
|
||||||
|
|
||||||
package = helpers.mkPackageOption "lualine" pkgs.vimPlugins.lualine-nvim;
|
package = helpers.mkPackageOption "lualine" pkgs.vimPlugins.lualine-nvim;
|
||||||
|
|
||||||
|
iconsEnabled = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
description = "Whether to enable/disable icons for all components.";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
theme = helpers.defaultNullOpts.mkStr "auto" "The theme to use for lualine-nvim.";
|
theme = helpers.defaultNullOpts.mkStr "auto" "The theme to use for lualine-nvim.";
|
||||||
|
|
||||||
componentSeparators = mkSeparatorsOption {
|
componentSeparators = mkSeparatorsOption {
|
||||||
|
@ -216,6 +222,7 @@ in {
|
||||||
processSections = sections: mapAttrs (_: mapNullable (map processComponent)) sections;
|
processSections = sections: mapAttrs (_: mapNullable (map processComponent)) sections;
|
||||||
setupOptions = {
|
setupOptions = {
|
||||||
options = {
|
options = {
|
||||||
|
icons_enabled = cfg.iconsEnabled;
|
||||||
theme = cfg.theme;
|
theme = cfg.theme;
|
||||||
section_separators = cfg.sectionSeparators;
|
section_separators = cfg.sectionSeparators;
|
||||||
component_separators = cfg.componentSeparators;
|
component_separators = cfg.componentSeparators;
|
||||||
|
@ -231,7 +238,9 @@ in {
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins =
|
||||||
|
[cfg.package]
|
||||||
|
++ (optional cfg.iconsEnabled pkgs.vimPlugins.nvim-web-devicons);
|
||||||
extraPackages = [pkgs.git];
|
extraPackages = [pkgs.git];
|
||||||
extraConfigLua = ''require("lualine").setup(${helpers.toLuaObject setupOptions})'';
|
extraConfigLua = ''require("lualine").setup(${helpers.toLuaObject setupOptions})'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue