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]: lua/dropbar/bar.lua:220: attempt to concatenate field 'icon' (a nil value) #190

Closed
stvhuang opened this issue Oct 31, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@stvhuang
Copy link

Description

Hi, and first off, thank you for the fantastic plugin! Since recent update, I've started encountering the error message below. From my investigation, it seems this issue began appearing following a specific commit a1b893c.

Error executing vim.schedule lua callback: .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:220: attempt to concatenate field 'icon' (a nil value)
stack traceback:
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:220: in function 'cat'
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:491: in function 'cat'
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:409: in function 'displaywidth'
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:421: in function 'truncate'
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:505: in function 'redraw'
        .../.local/share/nvim/lazy/dropbar.nvim/lua/dropbar/bar.lua:576: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

nvim version

NVIM v0.10.2

dropbar.nvim version

a1b893c

Operating system and version

macOS 14.7

Minimal config

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
    local lazyrepo = "https://github.com/folke/lazy.nvim.git"
    vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

require("lazy").setup({
    {
        "Bekaboo/dropbar.nvim",
        config = function()
            require("dropbar").setup({ icons = { enable = false } })
        end,
        lazy = false,
    },
})

Steps to reproduce

  1. Save the minimal configuration as minimal.lua
  2. nvim --clean -u mininal.lua /path/to/any/file

Expected behavior

No error

Actual behavior

The error message appears whenever any file is opened.

Additional information

No response

@Bekaboo
Copy link
Owner

Bekaboo commented Oct 31, 2024

Should be fixed in commit 28bcb1c, can you confirm?

@stvhuang
Copy link
Author

It's fixed now. Thanks so much!!

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

2 participants