nixvim-config/config/plugins/ui/nvim-tree.nix
2025-05-16 21:03:22 +08:00

47 lines
826 B
Nix

{...}: {
plugins.nvim-tree = {
enable = true;
# Configure nvim-tree
extraOptions = {
# Set width of nvim-tree
view = {
width = 38;
};
# Hide dotfiles
filters = {
dotfiles = true;
};
# fix: nvim-tree / auto-session
sync_root_with_cwd = true;
actions = {
change_dir = {
global = true;
};
};
# https://github.com/zwhitchcox/auto-session-nvim-tree
};
};
keymaps = [
{
mode = ["n"];
key = "<leader>n";
action = "<cmd>NvimTreeToggle<cr>";
options = {
desc = "Toggle NvimTree";
};
}
{
mode = ["n"];
key = "<leader>e";
action = "<cmd>NvimTreeFocus<cr>";
options = {
desc = "Focus NvimTree";
};
}
];
}