b0o / incline.nvim

🎈 Floating statuslines for Neovim, winbar alternative
MIT License
759 stars 14 forks source link

Incline disappears after switching tabs #17

Closed sanka047 closed 4 months ago

sanka047 commented 2 years ago

Staying in one tab and creating windows works as expected, however, the second I swap off the existing tab, incline no longer provides the filenames. Here are a couple of screenshots detailing the behavior:

Before tab creation

File names are visible at the top right of every window (expected):

Screen Shot 2022-05-14 at 6 15 32 PM

After tab creation

The [No Name] buffer name is now visible at the top right (expected):

Screen Shot 2022-05-14 at 6 15 49 PM

Swapping back to first tab

Incline no longer shows the file names for each of the open windows:

Screen Shot 2022-05-14 at 6 16 00 PM

Besides this one bug, the plugin looks great so far! Your work is much appreciated and I can't wait to fully transition to the new global status line.

b0o commented 2 years ago

Hi, thank you for your report! This is very interesting. I use tabs frequently and haven’t observed this. Can you please share your configuration?

edit: I just noticed that your incline configuration is in your screenshot! Based on what I see there, I don’t notice anything that should cause an issue. I think the issue might be arising from some interaction with another plugin or with something else in your neovim configuration. It would be helpful to find a minimum reproducible case.

sanka047 commented 2 years ago

Ahhh, gotcha. Yeah, you were right. Turns out dapc11/Shade.nvim is the offender. Whenever it adds an overlay over inactive windows it removes incline's file name.

If I create a new split after that last screenshot I posted (after all the incline windows were removed), incline will add back the floating window for just that window. Taking a deeper look, that's been screwing with a couple other of the plugins I use (treesitter context, etc). I'll likely just remove that for now and look into the implementation later.

Thanks for the help anyway!

b0o commented 2 years ago

Awesome, thanks for figuring that out. I’m going to re-open this because I’d like to see if we can fix the incompatibility.

sanka047 commented 2 years ago

Figured out the issue. It's just a case of clashing zindexs. I pulled down their repo and updated the floating windows they use to be 20 which fixed the bug. Unfortunately, it doesn't look like the parent plugin is still being maintained, so I may just have to keep a fork.

For this particular plugin: It might be beneficial to allow your floating windows to be configurable for a user-specified zindex

EDIT: It appears that as long as Shade has a higher zindex than any other floating window, it will simply hide the other windows entirely. Not entirely what I expected since Shade is configured to blend anyway, but if I set Shade's index to a little over the default value of 50, it will completely hide Telescope prompts, etc.

b0o commented 2 years ago

Good to know.

It might be beneficial to allow your floating windows to be configurable for a user-specified zindex

This is already possible with the window.zindex configuration option. See :help incline-config-window.zindex

Lately, zindex issues have been happening more frequently with plugins that utilize floating windows. See https://github.com/neovim/neovim/issues/18486. I will likely be adjusting Incline's default zindex up from 50 soon, but I'm not sure exactly which value I will pick yet. However...

if I set Shade's index to a little over the default value of 50, it will completely hide Telescope prompts, etc.

...this is blocking me, because I really don't want Incline to appear above Telescope windows, it looks bad. I opened an issue for this, see: https://github.com/nvim-telescope/telescope.nvim/issues/1926

Will keep this issue open until this is all resolved.

sanka047 commented 2 years ago

Yep, sounds good to me. I'll lower my Shade fork's zindex all the way down to 1 or something for now while I track those threads you mentioned.

b0o commented 4 months ago

Closing this as stale. If this is still an issue, please let me know and I'll re-open.