File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1653,6 +1653,12 @@ e.g. handler for node renamed: >
16531653 handler parameters: ~
16541654 {folder_name} `{string }` Absolute path to the removed folder.
16551655
1656+ - Event.TreeAttachedPost
1657+ Invoked after the tree's buffer has been created and mappings
1658+ have been applied: | nvim-tree-mappings | or | nvim-tree.on_attach |
1659+ handler parameters: ~
1660+ {buf} `{number} `API buffer handle (buffer number)
1661+
16561662==============================================================================
16571663 9. BOOKMARKS *nvim-tree-bookmarks*
16581664
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ M.Event = {
1515 FolderCreated = " FolderCreated" ,
1616 FolderRemoved = " FolderRemoved" ,
1717 Resize = " Resize" ,
18+ TreeAttachedPost = " TreeAttachedPost" ,
1819}
1920
2021local function get_handlers (event_name )
@@ -86,6 +87,11 @@ function M._dispatch_on_tree_resize(size)
8687 dispatch (M .Event .Resize , size )
8788end
8889
90+ -- @private
91+ function M ._dispatch_tree_attached_post (buf )
92+ dispatch (M .Event .TreeAttachedPost , buf )
93+ end
94+
8995--- @deprecated
9096function M .on_nvim_tree_ready (handler )
9197 M .subscribe (M .Event .Ready , handler )
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ local function create_buffer(bufnr)
9595 else
9696 require (" nvim-tree.actions" ).apply_mappings (M .get_bufnr ())
9797 end
98+ events ._dispatch_tree_attached_post (M .get_bufnr ())
9899end
99100
100101local function get_size ()
You can’t perform that action at this time.
0 commit comments