Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No bg for NotifyBackground #4

Closed
GiyoMoon opened this issue Apr 1, 2024 · 17 comments
Closed

No bg for NotifyBackground #4

GiyoMoon opened this issue Apr 1, 2024 · 17 comments
Assignees

Comments

@GiyoMoon
Copy link

GiyoMoon commented Apr 1, 2024

Hey! I just saw your theme on the neovim subreddit and wanted to give it a try. Looks awesome!

I got this warning from the nvim-notify plugin (only appears after a notification is shown):
image
I use the default config with require('eldritch').setup(). Thanks for your help!

@jacobrreed
Copy link
Member

I'll look into, although ive seen this with other themes as well

@GiyoMoon
Copy link
Author

GiyoMoon commented Apr 1, 2024

Thanks! I've used catppuccin, tokyonight and the lua port of everforest before and I haven't seen it happen.

@jacobrreed
Copy link
Member

ya interesting ill look at catppucin and everforest, this theme actually forked from tokyonight, and I have the highlight defined for NotifyBackground so let me look around and see

@jacobrreed
Copy link
Member

image
ya im getting the same thing with catpuccin and tokyonight

@jacobrreed
Copy link
Member

I can add something to the docs for people to add to notify, but im not sure any other way around it, it doesnt seem to respect the NotifyBackground highlight group

@jacobrreed
Copy link
Member

oddly enough if you set the background_colour to any color, my highlight group takes over, it seems like some weird race condition that shoots the notification off, even though colorscheme with priority=1000 will load way before, i'll file an issue and ask in notify's repo

@jacobrreed
Copy link
Member

rcarriga/nvim-notify#264 filed issue here, for now you can set any color in Notify's config using

background_color = "#000000"

@GiyoMoon
Copy link
Author

GiyoMoon commented Apr 1, 2024

interesting. thanks for looking into this!

@jacobrreed jacobrreed self-assigned this Apr 5, 2024
@Normanras
Copy link

Came here cause I was getting the same issue. What's interesting is in some buffers, when I switch to visual mode, I get no background/highlight color at all. Setting bg to #00000 does indeed trigger Eldritch's red color to begin showing up, but I thought it was strange that I didn't see a bg/highlight color when opening a new buffer.

@jacobrreed
Copy link
Member

Came here cause I was getting the same issue. What's interesting is in some buffers, when I switch to visual mode, I get no background/highlight color at all. Setting bg to #00000 does indeed trigger Eldritch's red color to begin showing up, but I thought it was strange that I didn't see a bg/highlight color when opening a new buffer.

Can you screenshot? This seems unrelated to Notify's background color issue unless I'm misunderstanding

@akthe-at
Copy link
Contributor

I can not reproduce this issue. I am using Neovim Nightly, on Windows OS -- no WSL2, Here is my config to setup Eldritch.nvim:

  {
    "eldritch-theme/eldritch.nvim",
    priority = 1000,
    opts = {},
    config = function()
      require("eldritch").setup({
        dim_inactive = true,
        transparent = true,
        hide_inactive_statusline = true,
        lualine_bold = true,
      })
      vim.o.termguicolors = true
    end,
  },

Can anyone confirm if this issue still persists with this sort of setup call? @jacobrreed @Normanras @GiyoMoon

@GiyoMoon
Copy link
Author

GiyoMoon commented Apr 11, 2024

yes this issue still persists, even with this setup() call

@akthe-at
Copy link
Contributor

I am trying to think of other differences...I am using Wezterm Terminal, I have tried this with and without a background image or background color set in the terminal as well. Do you use any neovim plugins that try to set transparency?

@GiyoMoon
Copy link
Author

I don't think so. I went and disabled all plugins and configurations apart from noice and the theme and it still happens :/

@jacobrreed
Copy link
Member

jacobrreed commented Apr 11, 2024

I tried with tokyonight and same thing happens. If you don't set a color for notify explicitly, it warns you on startup but then immediately switches to the correct color. I filed a big but no response yet

@jacobrreed
Copy link
Member

It does seem like it's a race condition, most likely because theme starts up with priority, for me at least, the notify warning shows up but still uses the background like it should. Then any subsequent calls to notify no longer have warning and honor colors, is this the same for everyone else? The workaround here is just setting any color as the background_colour option for notify

@jacobrreed
Copy link
Member

Fixed with above merge, thanks @akthe-at

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants