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 = { };
|
2024-04-27 02:44:28 +03:00
|
|
|
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:44:28 +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;
|
|
|
|
};
|
2024-04-27 02:44:28 +03:00
|
|
|
|
|
|
|
vim.g = lib.mkIf cfg.disableNetrw {
|
|
|
|
loaded_netrw = 1;
|
|
|
|
loaded_netrwPlugin = 1;
|
|
|
|
};
|
2024-04-27 02:29:05 +03:00
|
|
|
};
|
|
|
|
}
|