From 59820ad2ba003f5162007ca77cd02b05b79a06cf Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Thu, 6 Mar 2025 13:18:23 +0100 Subject: [PATCH] Add new nvim-tree keybinds --- nvim/lua/plugins/nvim-tree.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nvim/lua/plugins/nvim-tree.lua b/nvim/lua/plugins/nvim-tree.lua index 027cf34..1fd5465 100755 --- a/nvim/lua/plugins/nvim-tree.lua +++ b/nvim/lua/plugins/nvim-tree.lua @@ -13,10 +13,12 @@ return { sort = { folders_first = true, sorter = "name" - } + }, + filters = { custom = { "^.git$" } } } - vim.keymap.set('n', 'e', ":NvimTreeToggle", {silent = true}) - vim.keymap.set('n', 'e', ":NvimTreeFindFile", {silent = true}) + vim.keymap.set('n', 'e', ":NvimTreeToggle", {silent = true, desc = "Open nvim-tree"}) + vim.keymap.set('n', 'h', ":NvimTreeCollapseKeepBuffers", { silent = true, desc = "Collapse nvim-tree keeping open buffers" }) + vim.keymap.set('n', 'e', ":NvimTreeFindFile", {silent = true, desc = "Go to currently open file in buffer or close"}) end, }