skyline.vim
skyline.vim copied to clipboard
Allow global statusline if users have set it
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.
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
To support both, what about:
if &laststatus != 3
exe('set laststatus=' . get(g:, 'skyline_laststatus', '2'))
endif