goolord / alpha-nvim

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

Auto hide tabline doesn't work anymore (noautocmd) #55

Closed folliehiyuki closed 2 years ago

folliehiyuki commented 2 years ago

After commit 658aff2, setting autocmd FileType alpha set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2 won't work anymore (all autocmds are now disabled for the filetype alpha)

Doing this help getting the behavior back.

--- a/lua/alpha.lua
+++ b/lua/alpha.lua
@@ -385,7 +385,8 @@ local function enable_alpha(opts)
     -- I don't have the patience to sort out a better way to do this
     -- or seperate out the buffer local options.
     vim.cmd([[
-        noautocmd silent! setlocal bufhidden=wipe nobuflisted colorcolumn= foldlevel=999 foldcolumn=0 matchpairs= nocursorcolumn nocursorline nolist nonumber norelativenumber nospell noswapfile signcolumn=no synmaxcol& buftype=nofile filetype=alpha nowrap
+        silent! setlocal filetype=alpha
+        noautocmd silent! setlocal bufhidden=wipe nobuflisted colorcolumn= foldlevel=999 foldcolumn=0 matchpairs= nocursorcolumn nocursorline nolist nonumber norelativenumber nospell noswapfile signcolumn=no synmaxcol& buftype=nofile nowrap

         augroup alpha_temp
         au!

But if the commit was intended, is there a workaround (instead of touching the code like above)?

abzcoding commented 2 years ago

i have the same issue, this autocmd doesn't work anymore

autocmd FileType alpha nnoremap <silent> <buffer> q :q<CR>
goolord commented 2 years ago

ok cool, i will revert the change. i tested it on my machine and it worked, so sorry about that everyone

goolord commented 2 years ago

reverted in https://github.com/goolord/alpha-nvim/commit/b9844498a18cbf05e4dc94cf4a01b8efab903a25

goolord commented 2 years ago

anyways, this is supposed to have some observable speedup for some people depending on their config, so eventually i should figure out a migration plan that hopefully won't break anyone's configs. maybe it would also be beneficial to figure out how to improve the performance of whatever autocmd is taking so long upstream, even if you have a bunch of ftplugins it feels like firing filetype autocmds should be O(1) in the number of ftplugins you have

goolord commented 2 years ago

noautocmd was reintroduced as an opt in config option here https://github.com/goolord/alpha-nvim/commit/7ceb62ed560d7989585732728240db3ebffc5692

folliehiyuki commented 2 years ago

I tried out the new noautocmd = true option with the new autocmd and it seems my neovim loading time speed up a few ms :) Thanks for the hard work