Files
cnix/home/modules/devtools/nixvim/plugins/neo-tree.nix
2024-08-31 20:24:08 +02:00

36 lines
687 B
Nix

{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.modules.devtools.nixvim.plugins.neo-tree;
in {
options = {
modules.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;
}
];
};
};
}