TaDaa / vimade

An eye friendly plugin that fades your inactive buffers and preserves your syntax highlighting!
MIT License
492 stars 9 forks source link

vimade hides StatusLine on CheckWindows or redraw or something. #78

Closed jondkinney closed 3 weeks ago

jondkinney commented 1 month ago

I've been trying to troubleshoot this issue for a few days now over many hours with a local instance of the plugin with no luck.

No matter if I have the stock statusline, heirline, or lualine, the statusline seems to briefly show when opening vim, and then hide. Moving windows or moving the cursor will bring it back for 500ms (by default) but then it hides again. If I set the checkinterval to 10,000ms then it will stay visible for roughly 10s. I'm tempted to just set the checkinterval to 9999999999999999 and call it a day, but I'm too invested now for a hack 😂

The only way I've been able to get the statusline it to stay is an odd combination of plugins where heirline and lualine are both enabled, but a problem causes heirline to not load properly. For some reason, in that specific scenario, it kinda works...lualine shows for the statusline and stays visible, though all the other stuff that heirline was supposed to do (tabline, sign column fold indicators, etc.) is broken, so it's not really a solution.

It doesn't seem like highlight groups are overwriting the statusline causing it to be "there" but with bg colors effectively making it invisible (though that could be the case, it just didn't seem like it to me with my debugging).

Any thoughts? I love the plugin, but the flashing statusline makes it unusable, and I don't really want to disable the status line, either.

TaDaa commented 1 month ago

Thanks for reporting!

Which version of neovim are you using and I'll need an example config to reproduce the issue. Lualine doesn't work at all for me on 0.10.1

jondkinney commented 3 weeks ago

@TaDaa, but it appears to be something inside of https://github.com/AstroNvim/astrocore that is causing the conflict with vimade resulting in the status line hiding after vim open and upon entering a buffer.

This is what I did to disable every other plugin (below). I was able to reproduce the issue with astrotheme and astroui also disabled, but there were errors/warnings when doing so since all of those packages kind of rely on each other. This is the minimal config with a newly installed AstroNvim that exhibited the issues with no errors or warnings on load.

That said, I believe astrocore is the culprit. But it'll take some further research. Is this something you'd be able to help look into? If so, do you need more info on how to get this setup locally?

CleanShot 2024-08-19 at 11 33 32@2x

jondkinney commented 3 weeks ago

I wonder if it's this https://github.com/AstroNvim/astrocore/blob/8a66da8b8d4dfd783703195a6448aad75837d947/lua/astrocore/toggles.lua#L107

Actually, now that I dig in a bit deeper, it's almost certainly something here: https://github.com/AstroNvim/AstroNvim/blob/7e298404def07e637426eec478bef7463ff29113/lua/astronvim/plugins/_astroui_status.lua#L138

mehalter commented 3 weeks ago

This is actually unrelated to the statusline. The statusline flickering is a side effect of cmdheight = 0 and not a reflection of the statusline being modified. :set cmdheight = 1 fixes the issue.

The problem here is with the plugin not playing nicely with cmdheight = 0. When the command line is hidden, if a single line is printed to messages then it will hide the statusline and show the message. It seems like something in the plugin is triggering this extremely regularly

mehalter commented 3 weeks ago

Here is a minimal reproducing configuration:

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

vim.opt.cmdheight = 0

require("lazy.minit").repro({
  spec = {
    "TaDaa/vimade",
  },
})

Simply save the above to something like repro.lua and run with nvim -u repro.lua

jondkinney commented 3 weeks ago

Thanks @mehalter! Hopefully that will point @TaDaa in the right direction for a fix, or I suppose it could just be documented to have folks set cmdheight = 1 if changes aren't desired.

TaDaa commented 3 weeks ago

Awesome, thanks @mehalter! The issue seems to be caused by execute(:colorscheme) when cmdheight=0. Must be a Neovim bug, but should be easy enough to switch things over to use g:colors_name instead