j-hui / fidget.nvim

💫 Extensible UI for Neovim notifications and LSP progress messages.
MIT License
2k stars 58 forks source link

Highlights differ if window spans area with text #32

Open gegoune opened 2 years ago

gegoune commented 2 years ago

Hey, I was noticing that sometimes I get dimmed notifications and finally caught the scenario when dimming happens.

Highlights will be dimmed if fidget's window is drawn over area with no text; that is not the case if there is text on lines underneath fidget's window.

Please see this quick screencast illustrating above:

https://user-images.githubusercontent.com/69750637/151766646-ba4a849b-12cb-485a-93ba-ff6362242e7c.mov

Please note that dimming goes away even if I change buffer while previously dimmed text still persist on the screen, but underlying lines are filed with text.

Desired highlights are the brighter ones:

title task

Tried with:

require('fidget').setup {
  window = {
    winblend = 100,
  },
}

as well as window.winblend = 0 - outcome is the same in both cases.

xulongwu4 commented 2 years ago

I noticed that this doesn't happen when winblend is zero

gegoune commented 2 years ago

Can confirm. As you can see in my original report I mistakenly set window.winblend instead of window.blend which I believe was in readme/docs at the time.

j-hui commented 2 years ago

Yeah there was previously a typo in the docs, which has since been fixed.

Sorry I haven't had time to look into this yet, but ideally this shouldn't happen even with window.blend set to 100.

lalitmee commented 2 years ago

@j-hui, I am not sure if this is a related issue, but I am also facing something like this.

fidget

I have tried setting the highlights but that is only setting the highlight for the foreground, not the background.

lalitmee commented 2 years ago

In my config, I had Normal highlight guibg set to NONE.

Removed that and fixed.

j-hui commented 1 year ago

Seems to be fixable with some amount of config wrangling.

gegoune commented 11 months ago

Would you mind explaining what you have in mind? I am still seeing that issue with latest changes (great work btw! Thanks a bunch!)

j-hui commented 11 months ago

@gegoune Sure, what config and theme are you using at the moment?

gegoune commented 11 months ago

All defaults from fight.nvim, just calling setup(), colorscheme is zenbones.

j-hui commented 11 months ago

Ugh ok I had really not closely read the steps to reproduce from the original post, this is clearly still an issue.

rtgiskard commented 10 months ago

Ugh ok I had really not closely read the steps to reproduce from the original post, this is clearly still an issue.

I have just find the similar issue related to winblend: winblend issue

The C source file end at line 37, the right bottom notifications are fidget progress messages from <C-f> format operation. The color of popup progress message greatly inflected by the background context with winblend=100.

To reproduce, you may use this config, and edit some file like lua, then just press <C-f> repeated so that you get repeat progress message for the format operation.

j-hui commented 10 months ago

Yeah so this is something to do with the semantics of winblend. I looked into it at one point since re-opening this issue, but didn’t really conclude anything useful, though I suspect a fix will either have to come from (1) Neovim itself, or (2) switching to extmark-based rendering (which gives me more fine-grained control over which parts of the buffer are populated).

I wanted to wait until I’d experimented with (2) first before filing an issue upstream/haven’t had bandwidth to get around to it (I’m working on deduplication rn)

baggiponte commented 10 months ago

I had the same problem as @lalitmee. I am using gruvbox material with transparent background and I solved it by setting winblend to 0.