From 831b80c1ab9194b237dd42094c20cefa46b6378c Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 2 Aug 2025 12:24:01 -0400 Subject: [PATCH] fixing issues on nerd tree modifying the tree --- lua/cargdev/plugins/nvim-tree.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/cargdev/plugins/nvim-tree.lua b/lua/cargdev/plugins/nvim-tree.lua index 28c4287..ee896c9 100644 --- a/lua/cargdev/plugins/nvim-tree.lua +++ b/lua/cargdev/plugins/nvim-tree.lua @@ -73,32 +73,32 @@ return { -- File Management keybindings vim.keymap.set("n", "a", function() -- Add a new file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.create() end, opts) vim.keymap.set("n", "r", function() -- Rename file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.rename() end, opts) vim.keymap.set("n", "d", function() -- Delete file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.remove() end, opts) vim.keymap.set("n", "x", function() -- Cut (move) file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.cut() end, opts) vim.keymap.set("n", "p", function() -- Paste file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.paste() end, opts) vim.keymap.set("n", "y", function() -- Copy file - vim.cmd("set modifiable") -- Ensure modifiable mode is on + vim.api.nvim_buf_set_option(bufnr, "modifiable", true) api.fs.copy.node() end, opts) end,