j-hui / fidget.nvim

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

Fidget background not transparent after setting window = { blend = 0 } #240

Closed M0hanrajp closed 4 months ago

M0hanrajp commented 4 months ago

[ Issue Description ]

Initially I Changed my colorscheme to 'gruvbox' and set transparent_mode as 'true'. [This works] Since fidget background was opaque with black color I decided to make the following changes:

      {
        'j-hui/fidget.nvim',
        config = function()
          require('fidget').setup {
            window = {
              blend = 0, -- Background color opacity in the notification window
            },
          }
        end,
      },

Even after setting blend = 0 or winblend = 0, the fidget background stays the same.

Screenshot (23)

Also there was an error recorded in fidget.nvim.log:

:~/.cache/nvim$ cat fidget.nvim.log
[WARN  Mon May 20 12:12:35 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:12:35 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:18:23 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:18:23 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:19:07 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:19:07 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:19:23 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:19:23 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:19:52 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:19:52 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:30:43 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:30:43 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:31:13 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:31:13 2024] /lua/fidget.lua:52: - unknown option: window
[WARN  Mon May 20 12:36:40 2024] /lua/fidget.lua:50: Encountered unknown options during setup():
[WARN  Mon May 20 12:36:40 2024] /lua/fidget.lua:52: - unknown option: window

Please help on this, Thanks

j-hui commented 4 months ago

Per the documentation, the option isn't window.blend (nor window.winblend), it's notification.window.blend. So you should be calling setup() like this:

require('fidget').setup {
  notification = { -- NOTE: you're missing this outer table
    window = {
      winblend = 0, -- NOTE: it's winblend, not blend
    },
  },
}

So at least it should start doing something for you. But how that option interacts with everyone's colorscheme and terminal transparency settings has been... hard to predict. In my experience. So your mileage may vary.

FWIW there's a longstanding issue #32 that tracks a particular problem I've had, that you may be interested in looking at.

M0hanrajp commented 4 months ago

Thankyou @j-hui, it's working!

Screenshot (24)

9mm commented 4 months ago

I had a side question not really important enough for a whole new issue. Mine currently looks like this

How did you get different colors in your gif in the README? All my text is white, it's not different colors.

I'm also using catpuccin and i have tried enabling the fidget = true in integrations, and it just changed text from all gray to all white, but not with syntax highlighting. Are you using some other special config?

image
M0hanrajp commented 4 months ago

I had a side question not really important enough for a whole new issue. Mine currently looks like this

How did you get different colors in your gif in the README? All my text is white, it's not different colors.

I'm also using catpuccin and i have tried enabling the fidget = true in integrations, and it just changed text from all gray to all white, but not with syntax highlighting. Are you using some other special config?

image

Hello @j-hui , can you please advice @9mm ? Thanks.