skyline.vim icon indicating copy to clipboard operation
skyline.vim copied to clipboard

Allow global statusline if users have set it

Open nonrice opened this issue 3 years ago • 2 comments
trafficstars

A neovim feature allows Global Status Lines via set laststatus=3. Currently, the plugin forces set laststatus=2, which prevents the use of the global statusline feature, as the plugin will override the user config.

This can be fixed by making sure laststatus is not equal to 3 before setting it to 2. This ensures that if the user sets a global statusline, it will not be overriden.

nonrice avatar May 04 '22 21:05 nonrice

Thanks for letting me know about the new patch. A better way to do this may be to use get(g:, 'laststatus', '2') to address future cases

ourigen avatar Jun 05 '22 02:06 ourigen

To support both, what about:

if &laststatus != 3
    exe('set laststatus=' . get(g:, 'skyline_laststatus', '2'))
endif

jssteinberg avatar Jun 28 '22 09:06 jssteinberg