modules: add lualine interface module
This commit is contained in:
parent
72bdc91e49
commit
f3c3646f1c
3 changed files with 39 additions and 1 deletions
|
@ -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
|
||||
|
|
38
modules/plugins/interface/lualine.nix
Normal file
38
modules/plugins/interface/lualine.nix
Normal 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;
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -92,7 +92,6 @@ let
|
|||
inherit (config) pattern buffer desc callback command once nested;
|
||||
group = call "vim.api.nvim_create_augroup" [ config.group { } ];
|
||||
}
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue