I was trying to get rich of the search highlights in my notifications. For example, when searching for foo:
I tried it this way:
-- Create a new namespace
local no_search_hl = vim.api.nvim_create_namespace("no_search_hl")
-- Remove search highlighting in that namespace
vim.api.nvim_set_hl(no_search_hl, "Search", { bg = "none" })
-- Use this namespace for nvim-notify's windows
require("notify").setup({
on_open = function(win)
vim.api.nvim_win_set_hl_ns(win, no_search_hl)
end,
})
However, I must be doing something wrong, since the highlights are still there. Any pointers as to what I could do to disable them? :(
I've encountered the same issue. When I use the same method as OP, I get some weird highlighting behavior. It would be wonderful if there's a fix for this!
I was trying to get rich of the search highlights in my notifications. For example, when searching for![Screenshot_20230127_142648](https://user-images.githubusercontent.com/620981/215097910-008f5701-df04-40dc-ac84-037ced670843.png)
foo
:I tried it this way:
However, I must be doing something wrong, since the highlights are still there. Any pointers as to what I could do to disable them? :(