modules: add lualine interface module

This commit is contained in:
Dmitriy Pleshevskiy 2024-05-05 18:33:11 +03:00
parent 72bdc91e49
commit f3c3646f1c
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
3 changed files with 39 additions and 1 deletions

View file

@ -12,6 +12,7 @@
./modules/plugin.nix
./modules/fn.nix
./modules/plugins/interface/lualine.nix
./modules/plugins/language-server/lspconfig.nix
./modules/plugins/navigation/hop-nvim.nix
./modules/plugins/navigation/telescope.nix

View file

@ -0,0 +1,38 @@
{ 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;
};
})
]);
}

View file

@ -92,7 +92,6 @@ let
inherit (config) pattern buffer desc callback command once nested;
group = call "vim.api.nvim_create_augroup" [ config.group { } ];
}
];
};
};