-
Notifications
You must be signed in to change notification settings - Fork 469
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
feat: add winbar support #689
Conversation
I'll wait on it and see first what winbar can best be used for . Also what ideas community can come up with for winbar . vim has had winbar for long time and tbh I've only noticed it to be used in vimspector. For now I don't think using winbar just as a statusline is a good idea . I'll prefer to have winbar to be buffer specific unlike global . A winbar specific plugin can probably pull it of better than if just treat is as part of statusline in lualine. So I'm putting it on hold . Not entirely rejecting it nor accepting the idea. |
@shadmansaleh btw I think winbar is a nice place to have information like |
@diegodox exactly what I want. There is a lot of buffer specific info in my global statusline at the moment. |
PS: I found winbar is only reasonable place to show filename of each buffer (especially inactive buffer) with global status line. |
The most useful points of
Setting them is very easy and no need further supports. I believe a fancy |
Sorry for being totally off topic here guys... But @rockyzhang24, do you mind sharing your font and color scheme from that screenshot? |
@bellini666 No problem.
Font: JetBrainsMono |
Furthermore, with the creation of nvim-navic, I think the community has certainly made up it's mind about the utility of the winbar. |
@alex-popov-tech I think the ideal approach would be to be flexible enough for users to display whatever information they want on each. Like we do now with lualine sections, but having an extra set of section keys in the configuration for winbar sections. It already supports statusline and tabline this way, why not winbar as well? In a perfect world users would be able to add lualine components and extensions currently used for statusline to the winbar, and vice-versa. As you point out, a popular configuration could be winbar for buffer specific info and statusline for global/project level info. Another one could be, for example, statusline for the focused buffer (with a more detailed view) and winbar for inactive buffers. Someone might not care about diagnostic info on inactive buffers, while someone else might want to see which lsp clients are attached to each buffer instead of globally (for whatever reason). |
@diegodox I'd like to add that because you set the global winbar ( Sorry if this is bothersome but I know a lot of people will be bothered by there being an empty winbar essentially wasting space in a buffer. |
Pull in winbar changes form pr #689 and adapt them Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
@barrett-ruth Thank you for pointing out |
Need advice on implementation approach, is autocmd right choice to set winbar window option? or more simpler way exists? |
@shadmansaleh I will look and test that branch, thank you. |
addressing that issue is the purpose of #736 . So lualine can keep running even when options are unset. |
* feat: refresh lualine based on timer. * fix config test * fix lag on win change issue * handle errors in timer callback * feat: add winbar support Pull in winbar changes form pr #689 and adapt them Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> * make winbar disapear when winbar evals empty * only update stl of curwin with globalstatus * properly clear win local stl and wbr opts * add version guards for winbar feature * only add winbar if height > 1 * fix tests? * refresh lualine on ModeChanged event * ignore floating windows for refresh * properply restore options to previous state * fix stl not updating in cmd mode + some optimizations * fix tests on <nvim-0.7 * merge status_dispatch & winbar_dispatch + winbar support for extensions * fix globalstatus option not live updating * update docs * feat: allow disabling winbar and statusline separately * fix tests * fix: winbar some times oddly throwing errors about not having space in floating windows. This implements a temporary workaround the issue(neovim/neovim#19464) until the bug in neovim gets fixed. Co-authored-by: Diego Fujii <android.mxdiego9@gmail.com>
) * feat: refresh lualine based on timer. * fix config test * fix lag on win change issue * handle errors in timer callback * feat: add winbar support Pull in winbar changes form pr nvim-lualine#689 and adapt them Co-authored-by: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> * make winbar disapear when winbar evals empty * only update stl of curwin with globalstatus * properly clear win local stl and wbr opts * add version guards for winbar feature * only add winbar if height > 1 * fix tests? * refresh lualine on ModeChanged event * ignore floating windows for refresh * properply restore options to previous state * fix stl not updating in cmd mode + some optimizations * fix tests on <nvim-0.7 * merge status_dispatch & winbar_dispatch + winbar support for extensions * fix globalstatus option not live updating * update docs * feat: allow disabling winbar and statusline separately * fix tests * fix: winbar some times oddly throwing errors about not having space in floating windows. This implements a temporary workaround the issue(neovim/neovim#19464) until the bug in neovim gets fixed. Co-authored-by: Diego Fujii <android.mxdiego9@gmail.com>
Support winbar added to nvim in this PR.