Closed ahmedkhalf closed 2 years ago
why not just overriding the open/close functions ? like :NvimTreeOpen | some_other_func
This works for opening, but for closing, there are many methods of closing, one of them is by doing :q
, so unfortunately for closing, we need a callback.
not sure i can manage all the different methods for closing, it depends on how users use nvim. You could actually bind keymaps for your use case by hacking around the ex commands.
See also #917
Implemented. See :help nvim_tree_events_kind
Currently, I have this:
It works, but the other lunarvim devs are not willing to accept it because it features 3 autocmds #1351. It would be great if nvim-tree could provide a lua callback whenever the tree opens or closes.