Closed gabriel-sevecek closed 1 year ago
Can't reproduce on the latest master with the provided config (which contains a typo at the end, btw). Can you give us more details? Would you be able to run this: :lua print(vim.inspect(require'bufferline'))
?
Is that the full error? If the stacktrace is longer that would help
Hey, thanks for the replies.
Running :lua print(vim.inspect(require'bufferline'))
prints true
.
The whole stack:
Failed to source `/home/gabriel/.local/share/nvim/lazy/barbar.nvim/plugin/barbar.lua`
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:438: Vim(source):E5113: Error while calling lua chunk: ...iel/.local/share/nvim/lazy/barbar.nvim/plugin/barb
ar.lua:18: attempt to index a boolean value
stack traceback:
^I...iel/.local/share/nvim/lazy/barbar.nvim/plugin/barbar.lua:18: in main chunk
^I[C]: in function 'cmd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:438: in function <...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437>
^I[C]: in function 'xpcall'
^I.../.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:437: in function 'source'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:396: in function 'source_runtime'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:364: in function 'packadd'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:304: in function '_load'
^I...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:180: in function 'load'
^I...hare/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:33: in function <...hare/nvim/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:26>
Failed to run `config` for barbar.nvim
...local/share/nvim/lazy/lazy.nvim/lua/lazy/core/loader.lua:330: attempt to index a boolean value
Neovim version:
❯ nvim --version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by nixbld
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/nix/store/ag8ka4jppvcrcdpzgs7hrwjh6zr15581-neovim-unwrapped-master/share/nvim
"
Run :checkhealth for more info
I can't reproduce either. Some things to try:
:lua = require'barbar'
print? lazypath
in a terminal/file browser and ensure the contents of plugin/barbar.lua
match the contents of the file in our repo.lazypath
and reinstalling ittrue
md5sum
confirmsI get the same error with latest neovim from master :smiling_face_with_tear:
If you can get it to repro with a minimal config like this:
nvim --clean
--cmd 'set rtp+=~/.local/share/nvim/site/pack/packer/start/barbar.nvim'
--cmd 'set rtp+=~/.local/share/nvim/site/pack/packer/start/nvim-web-devicons'
--cmd 'lua require"barbar".setup()'
I can probably be of more help. Otherwise, it's likely an issue on the config/lazy side
(Change the paths to wherever barbar and nvim-web-devicons are installed)
That works, no error. Seems like it's some local or lazy issue. Thanks for helping with the troubleshooting.
So, I actually had a file like this ~/.config/nvim/lua/barbar.nvim
:facepalm:
It contains which-key config for barbar, I guess that was being loaded instead of the actual barbar.nvim
. It didn't cause any issues, until it did (I guess it stopped working after an update).
Sorry for wasting your time and thanks again.
Ah, that'd do it. Top-level modules (e.g. lua/foo.lua
) that have the same name of a plugin (e.g. nvim-foo
or foo.nvim
) can cause clashes in the loader.
If you didn't already find another solution, you can move that file to lua/plugin/barbar.lua
(or lua/<your_username>/barbar.lua
) and it will work (of course, update anything that references the old path)
Description
A clear and concise description of what the bug is.
Getting the following error on startup:
To Reproduce
init.lua:
Informations Neovim version: 0.8.3