nvim-tree / nvim-web-devicons

lua `fork` of vim-web-devicons for neovim
MIT License
1.92k stars 181 forks source link

Invalid highlight name #440

Closed hyde-stevenson closed 2 months ago

hyde-stevenson commented 2 months ago

Hello,

I updated this morning my plugins, and now I get :


Failed to run `config` for nvim-tree.lua

...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:286: Invalid highlight name: 'DevIconTrisquel_GNU-Linux

And sometimes I got the same message with : Invalid highlight name: 'DevIconParabola_GNU-Linux_libre'

Any idea ?

dannyk3941 commented 2 months ago

I'm also getting similar error aftering updating plugins with lazy.vim

Screenshot 2024-04-09 at 5 33 01 PM

Not sure where to go from here

adjioev commented 2 months ago

Same issue, below is the full message:

E5248: Invalid character in group name
E5108: Error executing lua ...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:286: Invalid highlight name: 'DevIconParabola_GNU-Linux_libre'
stack traceback:
    [C]: in function 'nvim_set_hl'
    ...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:286: in function 'set_up_highlight'
    ...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:314: in function 'set_up_highlights'
    ...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:410: in function 'setup'
    ...re/nvim/lazy/nvim-web-devicons/lua/nvim-web-devicons.lua:470: in function 'get_icon'
    .../nvim/lazy/bufferline.nvim/lua/bufferline/utils/init.lua:205: in function 'get_icon'
    ...hare/nvim/lazy/bufferline.nvim/lua/bufferline/models.lua:168: in function 'new'
    ...are/nvim/lazy/bufferline.nvim/lua/bufferline/buffers.lua:66: in function 'get_components'
    ...local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:56: in function <...local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:54>
    [C]: in function 'ui_attach'
    .../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:74: in function 'enable'
    ...oev/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:61: in function 'enable'
    ...oev/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:23: in function <...oev/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:19>
    [C]: in function 'xpcall'
    ...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function 'try'
    ...oev/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:19: in function <...oev/.local/share/nvim/lazy/noice.nvim/lua/noice/init.lua:18>
tp86 commented 2 months ago

Same here, I believe it's because of dashes in icon names introduced in https://github.com/nvim-tree/nvim-web-devicons/pull/433

hasecilu commented 2 months ago

Hi, when I made that change originally I used / in the names and and received that same error so I changed the / for the - and didn't get error, just tested maaster again and don't have problem, I'm using Alacritty.

parkerkain-8451 commented 2 months ago

I'm seeing the same issue using kitty as of this morning. Do you think this is terminal specific @hasecilu ?

hasecilu commented 2 months ago

That would be strange, or could be also the _? I'm looking at the code and seems no other names are using _ or -. I use LazyVim that uses Neotree that uses nvim-web-devicons, not sure if that's relevant.

meatballs commented 2 months ago

I'm seeing this on both kitty and gnome terminal on Ubuntu

(Edit - I'm using nvim-tree in case that's relevant)

hasecilu commented 2 months ago

I'll remove both - and _ , could someone test removing -, probable location ~/.local/share/nvim/lazy/nvim-web-devicons/

GianlucaP106 commented 2 months ago

Same issue here

wyankx commented 2 months ago

Same issue

oldtune commented 2 months ago

having same issue with DevIconLoc-OS

hasecilu commented 2 months ago

Could you try to update to Neovim 0.9.5 and see if the problem remains? https://github.com/nvim-tree/nvim-web-devicons/pull/441#issuecomment-2045527259

henry-hsieh commented 2 months ago

I have tested on Neovim v0.9.4 and v0.9.5. The v0.9.4 has these errors, but v0.9.5 not.

GianlucaP106 commented 2 months ago

I have also updated to nvim v0.9.5 and this solved the problem. Same conclusion as @henry-hsieh

hyde-stevenson commented 2 months ago

Yeah the upgrade fixed it :)