How can I set Neotree to auto close when a file is opened? #1454
Replies: 1 comment 1 reply
-
Could you try the following in your return {
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
filesystem = {
window = {
mappings = {
["L"] = "open_nofocus"
},
},
commands = {
open_nofocus = function(state)
require("neo-tree.sources.filesystem.commands").open(state)
vim.schedule(function()
vim.cmd([[Neotree close]])
end)
end,
},
},
},
},
} Test it out to see if it's what you want. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I looked through Neotree's recipe and put it in my plugins folder, with no luck:
plugins/neotree.lua
Any ideas on how to do it?
Beta Was this translation helpful? Give feedback.
All reactions