modules: add nvim-tree module

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-27 02:29:05 +03:00
parent 6e3a18b867
commit b683936ece
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 23 additions and 0 deletions

View file

@ -12,6 +12,7 @@
./modules/plugins/theme/catppuccin.nix
./modules/plugins/navigation/telescope.nix
./modules/plugins/navigation/nvim-tree.nix
##################################################
(pkgs.path + "/nixos/modules/misc/assertions.nix")

View file

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
let cfg = config.plugins.navigation.nvim-tree; in
{
options.plugins.navigation.nvim-tree = with lib; with types; {
enable = mkEnableOption "nvim-tree";
package = mkPackageOption pkgs.vimPlugins "nvim-tree-lua" { };
settings = mkOption {
type = attrs;
default = { };
};
};
config = lib.mkIf cfg.enable {
plugin.nvim-tree-lua = {
name = "nvim-tree";
package = cfg.package;
setupSettings = cfg.settings;
};
};
}