Close neotree upon open file
This commit is contained in:
@@ -7,6 +7,16 @@ return {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal right toggle<CR>', {})
|
||||
end
|
||||
require("neo-tree").setup({
|
||||
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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user