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

bug: (notifier) Can't change notifier.show_history() float window title and border highlights. #185

Closed
polirritmico opened this issue Dec 1, 2024 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@polirritmico
Copy link
Contributor

polirritmico commented Dec 1, 2024

Describe the bug

Hi. I was adding support for Snacks in my colorscheme, but I couldn't get the highlight groups for the notifier.show_history() float window title and border:

2024-12-01_171804

Here I'm using this undocumented hl groups, but none of them affects the float window title and/or border:

local test_hl = { fg = "#ff00ff", bg = "#00ff00" }
local ret = {
  -- etc.
  SnacksNotifierHistory = test_hl, -- Float window Normal
  SnacksNotifierHistoryDateTime = test_hl, -- Dates in entries
  SnacksNotifierHistoryTitle = test_hl, -- Changes the `Snacks` text for each log entry 
}

Maybe related to this line:

Snacks.config.style("notification.history", {
  -- etc.
  wo = { winhighlight = "Normal:SnacksNotifierHistory" },
})

For example, if changed to something like:

wo = {
  winhighlight = "Normal:SnacksNotifierHistory,FloatBorder:SnacksNotifierHistoryBorder,FloatTitle:SnacksNotifierHistoryTitle",
},

Then I could change the border and title:

2024-12-01_172505

Expected behavior

On my first approach I was expecting that the float border/title follows SnacksNormal. I don't know if that could be the appropriate hl or not, but it would be great if this could be adjusted, specially for floating windows bg transparency and related settings.

@polirritmico polirritmico added the bug Something isn't working label Dec 1, 2024
@polirritmico polirritmico changed the title bug: bug: (notifier) Can't change notifier.show_history() float window title and border highlights. Dec 1, 2024
@folke
Copy link
Owner

folke commented Dec 13, 2024

those undocumented groups are used to render the notifications themselves and have nothing to do with the title.
You can indeed just override the winhl for the notification history

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2024
@folke folke added the wontfix This will not be worked on label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants