neo-tree.nvim
neo-tree.nvim copied to clipboard
QUESTION: Is there a way to keep the cursor in its current position when opening a new window?
Normally cursor jumps to a newly opened window, but I would like it to stay in its current location (i.e Neotree). Can't find anything in the docs. I've also tried this workaround
...
event_handlers = {
{
event = "file_open_requested",
handler = function()
require("neo-tree.command").execute({ action = "close" })
vim.cmd("Neotree")
end
},
}
...
but it doesn't work as expected. It opens the tree, but the cursor stays where it was, even though, this:
...
handler = function()
require("neo-tree.command").execute({ action = "close" })
-- vim.cmd("Neotree")
end
...
+ :Neotree
would work.