fidget.nvim icon indicating copy to clipboard operation
fidget.nvim copied to clipboard

Highlights differ if window spans area with text

Open gegoune opened this issue 3 years ago • 13 comments

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.

gegoune avatar Jan 31 '22 09:01 gegoune

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

xulongwu4 avatar Feb 14 '22 19:02 xulongwu4

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.

gegoune avatar Feb 14 '22 21:02 gegoune

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.

j-hui avatar Feb 14 '22 21:02 j-hui

@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 avatar Mar 05 '22 03:03 lalitmee

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

Removed that and fixed.

lalitmee avatar Mar 07 '22 09:03 lalitmee

Seems to be fixable with some amount of config wrangling.

j-hui avatar Nov 10 '23 01:11 j-hui

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

gegoune avatar Nov 22 '23 23:11 gegoune

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

j-hui avatar Nov 22 '23 23:11 j-hui

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

gegoune avatar Nov 23 '23 00:11 gegoune

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

j-hui avatar Nov 24 '23 13:11 j-hui

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.

rtgiskard avatar Dec 29 '23 15:12 rtgiskard

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)

j-hui avatar Dec 29 '23 21:12 j-hui

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

baggiponte avatar Jan 14 '24 20:01 baggiponte