Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: lualine should not override user options unless explicitly requested #921

Open
2 tasks done
ZyX-II opened this issue Dec 27, 2022 · 2 comments
Open
2 tasks done
Labels
wontfix This will not be worked on

Comments

@ZyX-II
Copy link

ZyX-II commented Dec 27, 2022

Self Checks

How to reproduce the problem

  1. Run neovim with -u exampleConfig.vim (replace paths in first line with appropriate ones).
  2. Type :set showtabline? laststatus?.

Expected behaviour

Neovim reports both options as being equal to 1.

Actual behaviour

They are both set to 2.

Minimal config to reproduce the issue

set runtimepath=C:/tools/neovim/nvim-win64/share/nvim/runtime,P:/ath/to/lualine
set laststatus=1
set showtabline=1
lua << EOF
require('lualine').setup({
    tabline = { lualine_a = { 'tabs' } },
})
EOF

Additional information

Workaround using OptionSet from #395 used as-is not good idea because it prevents setting this option to anything else. It is obviously possible to create workaround for this issue of the workaround, but having options to configure options is something strange. Also just setting options after setup call for some reason works in the minimal config above, but not in my actual config.

@ZyX-II ZyX-II added the bug Something isn't working label Dec 27, 2022
@shadmansaleh
Copy link
Member

shadmansaleh commented Dec 28, 2022

I disagree with this. Most people using vim/nvim aren't aware of these options or what they do.

And people are usually looking for statuslline & tabline to be always visible. For example, if you're using your tabline to show your gitstatus it doesn't make sense for it only to be visible when there is more than 1 tab. That makes sense when you're using tabline to display only tabs like the builtin tabline . Same goes for statusline I don't think anyone wants their statusline to disappear when they have only one window open.

We are already taking over statusline & tabline options. I don't think there's anything wrong with us taking over a few more related options to provide better default behavior.

As for #395 I do intend to fix it properly. My idea is to make tabline disappear when the components in tabline all return empty. This lets the components decide when they want to show themselves. And the users can use cond option to provide their own logic when they want tabline to be shown, instead of relying on just the number of tabs. winbar already works like this. I just didn't get time to do the same for tabline yet.

One more thing is this your account https://github.com/ZyX-I ?

@shadmansaleh shadmansaleh added wontfix This will not be worked on and removed bug Something isn't working labels Dec 28, 2022
@ZyX-I
Copy link

ZyX-I commented Dec 28, 2022

I disagree with this. Most people using vim/nvim aren't aware of these options or what they do.

And people are usually looking for statuslline & tabline to be always visible. For example, if you're using your tabline to show your gitstatus it doesn't make sense for it only to be visible when there is more than 1 tab. That makes sense when you're using tabline to display only tabs like the builtin tabline . Same goes for statusline I don't think anyone wants their statusline to disappear when they have only one window open.

We are already taking over statusline & tabline options. I don't think there's anything wrong with us taking over a few more related options to provide better default behavior.

As for #395 I do intend to fix it properly. My idea is to make tabline disappear when the components in tabline all return empty. This lets the components decide when they want to show themselves. And the users can use cond option to provide their own logic when they want tabline to be shown, instead of relying on just the number of tabs. winbar already works like this. I just didn't get time to do the same for tabline yet.

I would actually not care if I had (known) alternative. laststatus part got noticed only while searching for similar issues.

One more thing is this your account https://github.com/ZyX-I ?

Yes, I created second to use it from work while first is only used from home. Not any real kind of active on either these days though…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants