Close neotree upon open file

This commit is contained in:
Pablu23
2024-05-21 09:49:18 +02:00
parent 56c9298213
commit c39bd34324

View File

@@ -7,6 +7,16 @@ return {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
}, },
config = function() config = function()
vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal right toggle<CR>', {}) require("neo-tree").setup({
end event_handlers = {
} {
event = "file_opened",
handler = function(file_path)
require("neo-tree.command").execute({ action = "close" })
end,
},
},
})
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal right<CR>", {}) -- toggle
end,
}