Bug: Only activates on current buffer
Describe the bug When I load up a previous session with multiple tabs/windows, only the first active buffer is colorised.
To Reproduce I use projections to load my sessions, however I imagine the same issue would occur with any sort of session manager.
Expected behavior All buffers should be colorised
Screenshots
(See the split on the left is not colorised)

Operating System: Windows 10
Neovim Version: v0.8.0
I'm doing something like this. You can remove CursorMoved from the events table as it might be too much.
local group = vim.api.nvim_create_augroup('colorAttach', { clear = true })
local events = { 'BufEnter', 'BufWinEnter', 'CursorMoved' }
vim.api.nvim_create_autocmd(events, {
pattern = { '*' },
callback = function()
vim.cmd([[
if exists('g:colorizer')
ColorizerAttachToBuffer
]])
end,
group = group,
})
```
If this still an issue ? Give steps to reproduce
I have the same problem, but it may be a different source to the same problem. Here is how to reproduce @Akianonymus
Install floaterm:
return {
'voldikss/vim-floaterm',
keys = {
{
'<Leader>x',
function() vim.cmd('FloatermNew --title=ZSH --floaterm_autoclose=2 --width=0.7 --height=0.4') end,
desc = 'ZSH shell',
},
},
}
Make a new lua file with the following:
return {
rosewater = '#f5e0dc',
flamingo = '#f2cdcd',
pink = '#f5c2e7',
mauve = '#cba6f7',
red = '#f38ba8',
maroon = '#eba0ac',
peach = '#fab387',
yellow = '#f9e2af',
green = '#a6e3a1',
teal = '#94e2d5',
sky = '#89dceb',
sapphire = '#74c7ec',
blue = '#89b4fa',
lavender = '#b4befe',
}
Now activate floaterm over top with <Leader>x
Now type exit to close the floating window
Immediately all color highlights get lost, and the only way to get them back again is by closing the buffer entirely and re-opening.
I noticed trying to call Colorize Attach/togge/enable/disable... none of them work. the only way is a complete wipe and re-open