feat(event): add TreeAttachedPost (#1877)

* feat(event): add OnAttachPost

* feat(event): add TreeAttachPost

* feat(event): add TreeAttachPost

* feat(event): TreeAttachedPost fired after all mappings created, not just on_attach
This commit is contained in:
Alexander Courtis
2023-01-07 11:50:41 +11:00
committed by GitHub
parent bac962caf4
commit f43f3110a5
3 changed files with 13 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ M.Event = {
FolderCreated = "FolderCreated",
FolderRemoved = "FolderRemoved",
Resize = "Resize",
TreeAttachedPost = "TreeAttachedPost",
}
local function get_handlers(event_name)
@@ -86,6 +87,11 @@ function M._dispatch_on_tree_resize(size)
dispatch(M.Event.Resize, size)
end
--@private
function M._dispatch_tree_attached_post(buf)
dispatch(M.Event.TreeAttachedPost, buf)
end
--- @deprecated
function M.on_nvim_tree_ready(handler)
M.subscribe(M.Event.Ready, handler)