From 969874055cb97a082579f561b0b14eb5bf77d712 Mon Sep 17 00:00:00 2001 From: Feliche-Demian Netliukh <51330172+Demianeen@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:45:05 +0000 Subject: [PATCH] fix(extras): first tabpage renaming issue --- lua/lazyvim/plugins/extras/ui/zoxide-tabpage.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/zoxide-tabpage.lua b/lua/lazyvim/plugins/extras/ui/zoxide-tabpage.lua index 1a06cce9..e87babfd 100644 --- a/lua/lazyvim/plugins/extras/ui/zoxide-tabpage.lua +++ b/lua/lazyvim/plugins/extras/ui/zoxide-tabpage.lua @@ -25,6 +25,7 @@ return { -- auto-rename tab when enter vim.api.nvim_create_autocmd("TabNewEntered", { callback = function() + vim.notify("Tab renamed to " .. getCurrentCwdDirName()) -- Schedule the renaming after the tab is fully entered vim.schedule(function() vim.cmd("BufferLineTabRename " .. getCurrentCwdDirName()) @@ -41,10 +42,8 @@ return { end end - -- hook into persistence.nvim to rename tabs after restoring a session vim.api.nvim_create_autocmd("User", { - pattern = "PersistenceLoadPost", - once = true, + pattern = "VeryLazy", callback = function() vim.defer_fn(function() if vim.fn.exists(":BufferLineTabRename") == 2 then @@ -53,6 +52,7 @@ return { end, 1000) end, }) + return opts end, },