lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.07k stars 102 forks source link

Error When Changing Background #835

Closed Philogy closed 5 months ago

Philogy commented 7 months ago

Problem

When I change the background using e.g. :lua vim.o.background = 'light' it triggers an error originating from the indent-blankline plugin, how do I fix?

Specifically the error looks like this:

E5108: Error executing lua: /home/philippe/.config/nvim/lua/maps.lua:43: Vim(append):Error executing lua callback: ...acker/start/indent-blankline.nvim/lua/ibl/highlights.lua
:75: invalid key:                                                                                                                                                             
stack traceback:                                                                                                                                                              
        [C]: in function 'nvim_set_hl'                                                                                                                                        
        ...acker/start/indent-blankline.nvim/lua/ibl/highlights.lua:75: in function 'setup'                                                                                   
        .../packer/start/indent-blankline.nvim/lua/ibl/autocmds.lua:56: in function <.../packer/start/indent-blankline.nvim/lua/ibl/autocmds.lua:55>                          
        [C]: in function 'nvim_set_option'                                                                                                                                    
        /home/philippe/.config/nvim/lua/maps.lua:43: in function </home/philippe/.config/nvim/lua/maps.lua:42>                                                                
stack traceback:                                                                                                                                                              
        [C]: in function 'nvim_set_option'                                                                                                                                    
        /home/philippe/.config/nvim/lua/maps.lua:43: in function </home/philippe/.config/nvim/lua/maps.lua:42>                                                                
Press ENTER or type command to continue

Steps to reproduce

  1. Clone my dotfiles (https://github.com/philogy/neovim-dotfiles)
  2. Open any file / empty neovim
  3. Change the background (any of :set background=light, :lua vim.o.background = 'light', or my shortcut <leader>cl, works)

Expected behavior

No error, a correct switching of the color theme including the indent hints from blankline

Neovim version (nvim -v)

v0.8.1

lukas-reineke commented 7 months ago

Please use the minimal reproduction template, and make sure your Neovim version is up to date. The latest stable version is 0.9.5

lukas-reineke commented 5 months ago

Closing this for inactivity. Feel free to open again with reproduction steps.