From b683936ece4dd20815de1bb75a4a37f6c111fca2 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sat, 27 Apr 2024 02:29:05 +0300 Subject: [PATCH] modules: add nvim-tree module --- module-list.nix | 1 + modules/plugins/navigation/nvim-tree.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 modules/plugins/navigation/nvim-tree.nix diff --git a/module-list.nix b/module-list.nix index 326720b..cdafd12 100644 --- a/module-list.nix +++ b/module-list.nix @@ -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") diff --git a/modules/plugins/navigation/nvim-tree.nix b/modules/plugins/navigation/nvim-tree.nix new file mode 100644 index 0000000..02d9cd3 --- /dev/null +++ b/modules/plugins/navigation/nvim-tree.nix @@ -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; + }; + }; +}