goolord / alpha-nvim

a lua powered greeter like vim-startify / dashboard-nvim
MIT License
1.78k stars 104 forks source link

Support closing alpha when opening a file in a new tab rather than the current buffer. #213

Open lougreenwood opened 1 year ago

lougreenwood commented 1 year ago

I work using tabpages as my primary organisation method, specifically using tabdrop.

This means that when I open my nvim instance I see my alpha dashboard, I then use telescope to open a file using tabdrop and a new tabpage is created with my file.

The problem is this means that the first tabpage (which contains alpha) is not automatically closed.

From what I can see, this is currently handled by the BufUnload autocmd. However, if I try adding TabNew then it doesn't work since after switching tabs there is no alpha instance in the current tab to close.

goolord commented 7 months ago

@lougreenwood added the new config option close_on_tabnew in the branch close_on_tabnew, would you like to test? @lougreenwood

theme.config.close_on_tabnew = true