Replies: 3 comments 2 replies
-
If the suggestion gets some support, I will work PR with a pleasure. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion! I already gave the answer in echasnovski/mini.statusline#1:
It does not. If user wants to use vim.o.laststatus = 3
require('mini.statusline').setup({ set_vim_settings = false })
One of the main design goals of 'mini.nvim' modules is to make them work as much as reasonably possible after a single At the moment, I don't think there is a need to change anything. But I'll take some time to maybe rethink. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for the suggestion! After thinking about it, making |
Beta Was this translation helpful? Give feedback.
-
Right now, by default
mini.statusline
overrides thelaststatus
option and sets it to be2
. This kinda of makes sense cause if you have a statusline plugin, you probably do not want the statusline being hidden.. However, I find this behavior confusing, cause it does silently overide an exlicit user configuration.Some background
I use the https://github.com/nvim-lua/kickstart.nvim, which includes the
mini.statusline
as a plugin enabled by default. I didn't even know that I use this plugin, until I realized mylaststatus
option set to3
is not respected anymore. Note, it worked fine after re-sourcing my config but then it just silently(and that's where I believe the problem is) stopped working after I reload my neovim instance. So for some time I didn't even realize I have mylaststatus
broken.Since the kickstart.nvim does not have any preferences on the
laststatus
, I assume it's not the kickstart.nvim responsibility to make a decisiion about theset_vim_settings
option.What's the issue
My first attempt to address the issue was to respect the
laststatus=3
echasnovski/mini.statusline#1. However, now I think the problem is really about mutating thelaststatus
at the first place.The current behavior makes configuring the
laststatus
in config pointless for the user. At the same time if I change the option via command line the value gets applied properly, so I can still hide the statusbar. This feels incosistent.I understand that there is a special explanation for the
laststatus=3
in the README. However, isn't it better if we don't need configuration for this at all?Suggestion
I'd like the plugin to not mutate the users global settings, and provide a user with an informative feedback in case of the "wrong"
laststatus
is detected on editor startup.As far as I can tell the plugin works just fine with either
laststatus=2
andlaststatus=3
. So we could whitelist them and do nothing if one of them is recognized. Otherwise, we could just warn the user that thelaststatus
he has specified in the nvim config does not work nice with the plugin.Alternatively, instead of allowing "good"
laststatus
values we could maintain a list of "bad" values. However, it might cause issues with forward compatibility in case if new possible values would be added by the nvim in the future.Beta Was this translation helpful? Give feedback.
All reactions