Closed rickywu closed 1 year ago
Remove the default
and it will override the highlight. See :hi-default
local notify = require("notify")
local icons = {
diagnostics = require("modules.ui.icons").get("diagnostics"),
ui = require("modules.ui.icons").get("ui"),
}
notify.setup({
---@usage Animation style one of { "fade", "slide", "fade_in_slide_out", "static" }
stages = "slide",
---@usage Function called when a new window is opened, use for changing win settings/config
on_open = nil,
---@usage Function called when a window is closed
on_close = nil,
---@usage timeout for notifications in ms, default 5000
timeout = 2000,
-- Render function for notifications. See notify-render()
render = "default",
---@usage highlight behind the window for stages that change opacity
background_colour = "Normal",
---@usage minimum width for notification windows
minimum_width = 50,
---@usage notifications with level lower than this would be ignored. [ERROR > WARN > INFO > DEBUG > TRACE]
level = "TRACE",
---@usage Icons for the different levels
icons = {
ERROR = icons.diagnostics.Error,
WARN = icons.diagnostics.Warning,
INFO = icons.diagnostics.Information,
DEBUG = icons.ui.Bug,
TRACE = icons.ui.Pencil,
},
vim.cmd([[
hi NotifyINFOIcon guifg=#6b8e23
hi NotifyINFOTitle guifg=#6b8e23
]]),
vim.notify = notify
Did I missed anything? Still not work
I found it use default hi color each time startup, and become customized hi color after isssue PackerSync Seems not override the default color when startup
Setting it before or after loading nvim-notify works just fine as long as default
is not set. It sounds like you're not compiling your packer config (with PackerCompile
) when testing and so you don't see the changes
PackerSync also compile packages
The 1st time use PackerCompile
2nd time seems works well
After restart:
I'm not sure what is going wrong but it is something wrong with your setup. It looks like the code is not being called for some reason. Closing this, but please re-open if you find an issue within nvim-notify
Just put in colorscheme solved it
I want to override highlight NotifyINFOTitle guifg=#A9FF68
because my backgroud is light color, so how should I do this?
I tried but not work