nixeovim/modules/plugins/interface/lualine.nix

38 lines
823 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.plugins.interface.lualine;
in
{
options.plugins.interface.lualine = with lib; {
enable = mkEnableOption "lualine-nvim";
package = mkPackageOption pkgs.vimPlugins "lualine-nvim" { };
settings = mkOption {
type = types.attrs;
default = { };
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
{
plugin.lualine-nvim = {
name = "lualine";
setupSettings = lib.mkMerge [
cfg.settings
(lib.mkIf config.plugins.navigation.nvim-tree.enable {
options.ignore_focus = [ "NvimTree" ];
})
];
};
}
(lib.mkIf config.plugins.language-server.lspconfig.enable {
plugin.lualine-lsp-progress = lib.mkDefault {
isDependency = true;
};
})
]);
}