Closed
Description
I tried this but it failed.
vim.keymap.set("n", "<leader>n", ":NvimTreeToggle<cr>", {current_window=true})
When I try this, it works:
vim.keymap.set("n", "<leader>n",
function() nvim_tree_api.tree.toggle({ path = "<args>", current_window = false, focus = true, find_file = false, update_root = false }) end,
{ noremap = true })
But when I run this in split window, it will destroy my split pattern, and open the file in non-focus buffer. Maybe this is a bug, or is there other points to config?