Skip to content

Commit 8cc0de6

Browse files
committed
Workaround clear_stl for lualine
Of course the bullshittery of lualine continues... I am so fed up with lualine, I now detect when people use this cursed statusline plugin and apply workarounds. Maybe I should add a g:my_next_statusline_wont_be_lualine option instead? I don't want to start a rant again, people can refer to 4d8acfd and other commits instead if they desire. Fixes #51
1 parent 6142ad2 commit 8cc0de6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

autoload/tpipeline/util.vim

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,19 @@ func tpipeline#util#clear_stl()
3030
set stl=%#StatusLine#
3131
endfunc
3232

33+
func tpipeline#util#is_lualine()
34+
" lualine doesn't play nice, so it needs extra workarounds
35+
return has('nvim') && !empty(nvim_get_autocmds(#{group: "lualine"}))
36+
endfunc
37+
3338
func tpipeline#util#set_stl_hooks()
3439
if empty(g:tpipeline_statusline) && !g:tpipeline_tabline
3540
if g:tpipeline_clearstl
36-
au OptionSet statusline if v:option_type == 'global' | call tpipeline#util#clear_stl() | endif
41+
if tpipeline#util#is_lualine()
42+
au OptionSet statusline call tpipeline#util#clear_stl()
43+
else
44+
au OptionSet statusline if v:option_type == 'global' | call tpipeline#util#clear_stl() | endif
45+
endif
3746
endif
3847
au OptionSet statusline call tpipeline#update()
3948
endif

0 commit comments

Comments
 (0)