rebelot / heirline.nvim

Heirline.nvim is a no-nonsense Neovim Statusline plugin designed around recursive inheritance to be exceptionally fast and versatile.
MIT License
1.04k stars 40 forks source link

[Bug]: E5108 invalid key #110

Closed Iron-E closed 1 year ago

Iron-E commented 1 year ago

Hello,

I was testing out this plugin after getting an issue on one of my plugins (Iron-E/nvim-libmodal#18), and wanted to post some new examples for integration with statuslines. However, I've been having trouble— I get E5108 when calling setup. I've produced a minimal example:

vim.api.nvim_set_hl(0, 'Foo', {})
require('heirline').setup {statusline = {{hl = 'Foo', provider = 'Test'}}}

The error is this:

E5108: Error executing lua ...hare/nvim/lazy/heirline.nvim/lua/heirline/highlights.lua:33: invalid key:                                                
stack traceback:
        [C]: in function 'nvim_set_hl'
        ...hare/nvim/lazy/heirline.nvim/lua/heirline/highlights.lua:33: in function 'make_hl'
        ...hare/nvim/lazy/heirline.nvim/lua/heirline/highlights.lua:103: in function 'eval_hl'
        ...hare/nvim/lazy/heirline.nvim/lua/heirline/statusline.lua:349: in function '_eval'
        ...hare/nvim/lazy/heirline.nvim/lua/heirline/statusline.lua:365: in function '_eval'
        ...hare/nvim/lazy/heirline.nvim/lua/heirline/statusline.lua:440: in function 'eval'
        ...ocal/share/nvim/lazy/heirline.nvim/lua/heirline/init.lua:89: in function <...ocal/share/nvim/lazy/heirline.nvim/lua/heirline/init.lua:84>

I'm using Neovim 0.8.3, and commit 81ceb3025e6c7030c42accc3951dad94f31ff0c8 of this plugin. Let me know if I'm just missing something.

rebelot commented 1 year ago

it should be fixed now :)

Iron-E commented 1 year ago

Thanks for the quick help. I was able to fully port my statusline over in no time.