modules/nvim-tree: add option to disable netrw
disable netrw by default
This commit is contained in:
parent
b683936ece
commit
c4cc7d5a80
1 changed files with 18 additions and 0 deletions
|
@ -9,14 +9,32 @@ let cfg = config.plugins.navigation.nvim-tree; in
|
|||
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`
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue