This commit is contained in:
Carlos
2025-02-20 00:50:00 -05:00
parent 7799a9343b
commit ae0acb574c
5 changed files with 118 additions and 49 deletions

View File

@@ -63,6 +63,12 @@ return {
-- Navigate Forward (Enter a Folder)
vim.keymap.set("n", "<leader>f", api.tree.change_root_to_node, opts)
-- Reload the tree (useful when files are added/removed)
vim.keymap.set("n", "l", function()
api.tree.reload() -- Reload the tree
print("NvimTree reloaded!") -- Optional confirmation message
end, opts)
-- File Management keybindings
vim.keymap.set("n", "a", function() -- Add a new file
vim.cmd("set modifiable") -- Ensure modifiable mode is on
@@ -91,7 +97,7 @@ return {
vim.keymap.set("n", "y", function() -- Copy file
vim.cmd("set modifiable") -- Ensure modifiable mode is on
api.fs.copy()
api.fs.copy.node()
end, opts)
end,
})