Files
cnix/home/modules/devtools/nixvim/plugins/neo-tree.nix
2024-10-13 18:09:15 +02:00

36 lines
695 B
Nix

{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.userModules.devtools.nixvim.plugins.neo-tree;
in {
options = {
userModules.devtools.nixvim.plugins.neo-tree.enable = mkEnableOption "Enables neo-tree plugin for nixvim";
};
config = mkIf cfg.enable {
programs.nixvim = {
plugins.neo-tree = {
enable = true;
closeIfLastWindow = true;
window = {
width = 30;
# autoExpandWidth = true;
};
};
keymaps = [
{
mode = "n";
key = "<leader>n";
action = ":Neotree focus toggle<CR>";
options.silent = true;
}
];
};
};
}