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: Only activates on current buffer #40

Open
Gazareth opened this issue Dec 29, 2022 · 3 comments
Open

Bug: Only activates on current buffer #40

Gazareth opened this issue Dec 29, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Gazareth
Copy link

Gazareth commented Dec 29, 2022

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)
image

Operating System:
Windows 10

Neovim Version:
v0.8.0

@Gazareth Gazareth added the bug Something isn't working label Dec 29, 2022
@LoneExile
Copy link

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,
})
```

@Akianonymus
Copy link
Collaborator

If this still an issue ? Give steps to reproduce

@9mm
Copy link

9mm commented Sep 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants