nvim-tree + auto-session fix

This commit is contained in:
♥ Minnie ♥ 2025-05-15 23:20:41 +08:00
parent a6709013ff
commit 7dd9c63f32
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
3 changed files with 59 additions and 1 deletions

View file

@ -0,0 +1,38 @@
{...}: {
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>e";
action = "<cmd>NvimTreeFocus<cr>";
options = {
desc = "Focus NvimTree";
};
}
];
}