Open gravityblast opened 1 month ago
+1, I had to use the following workaround
-- Highlight groups have to be reinitialized after setting the color scheme
-- <https://github.com/yetone/avante.nvim/issues/654>
vim.api.nvim_create_autocmd('ColorScheme', {
callback = function()
require('avante.highlights').setup()
end,
})
Describe the bug
If I change the colorscheme during a session, or if the colorscheme is applied by a plugin loaded after avante, the highlights in the titles are not set.
To reproduce
Change colorscheme during a session
Expected behavior
The highlights in the titles should remain.
I notice that it works changing
api.nvim_create_autocmd("ColorSchemePre", {
to
api.nvim_create_autocmd("ColorScheme", {
Is
ColorSchemePre
used on purpose for other reasons?Environment
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713773202
Repro