nixeovim/modules/plugins/navigation/nvim-tree.nix

41 lines
859 B
Nix
Raw Normal View History

2024-04-27 02:29:05 +03:00
{ 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 = { };
description = ''
`:help nvim-tree-setup`
'';
};
disableNetrw = mkOption {
type = bool;
default = true;
description = ''
Disabling netrw is strongly advised.
`:help nvim-tree-netrw`
'';
2024-04-27 02:29:05 +03:00
};
};
2024-04-27 02:29:05 +03:00
config = lib.mkIf cfg.enable {
plugin.nvim-tree-lua = {
name = "nvim-tree";
package = cfg.package;
setupSettings = cfg.settings;
};
vim.g = lib.mkIf cfg.disableNetrw {
loaded_netrw = 1;
loaded_netrwPlugin = 1;
};
2024-04-27 02:29:05 +03:00
};
}