utilyre / barbecue.nvim

Visual Studio Code inspired breadcrumbs plugin for the Neovim editor
MIT License
776 stars 31 forks source link

[BUG]: Opening trouble with diagnostics breaks #102

Closed Diaoul closed 6 months ago

Diaoul commented 6 months ago

Requirements

Expected Behavior

When I open diagnostics with trouble I have no error message.

Actual Behavior

   Error  21:26:15 msg_show.lua_error Error executing vim.schedule lua callback: ...cal/share/nvim/lazy/barbecue.nvim/lua/barbecue/theme.lua:172: table index is nil
stack traceback:
    ...cal/share/nvim/lazy/barbecue.nvim/lua/barbecue/theme.lua:172: in function 'get_file_icon'
    ...e/nvim/lazy/barbecue.nvim/lua/barbecue/ui/components.lua:84: in function 'basename'
    ....local/share/nvim/lazy/barbecue.nvim/lua/barbecue/ui.lua:106: in function 'create_entries'
    ....local/share/nvim/lazy/barbecue.nvim/lua/barbecue/ui.lua:219: in function <....local/share/nvim/lazy/barbecue.nvim/lua/barbecue/ui.lua:203>

Neovim Version

NVIM v0.10.0-dev-2513+g0ffc92649
Build type: RelWithDebInfo
LuaJIT 2.1.1707061634
Run "nvim -V1 -v" for more info

Minimal Configuration

That's a good question, I tried using default lazyvim as starting point but I could not reproduce despite having similar configuration.

The only thing that prevents the issue is disabling autocmd with create_autocmd = false.

Reproduction

Still working on a minimal setup.

Diaoul commented 6 months ago

Seems to be coming from this part of my config:

  {
    "nvim-tree/nvim-web-devicons",
    lazy = true,
    opts = {
      override = {
        default_icon = {
          icon = "",
        },
      },
      color_icons = true,
    },
  },
Diaoul commented 6 months ago

Fixed with https://github.com/Diaoul/dotfiles/commit/164ee82f3a7cb2254ef00826da6e9111bbc2fa15

Maybe that's something to look into still, seems weird that it makes barbecue.nvim crash where no other plugin do.