bufferline.nvim
bufferline.nvim copied to clipboard
E5108 error in bufferline.nvim
Is there an existing issue for this?
- [X] I have searched the existing issues
What happened?
i updated the buffer line to the newest version and now i can't open multiple buffers , it throws the below error
E5108: Error executing lua ...cal/nvim-data/lazy/bufferline.nvim/lua/bufferline/ui.lua:119: attempt to call field 'is_list' (a nil value) stack traceback: ...cal/nvim-data/lazy/bufferline.nvim/lua/bufferline/ui.lua:119: in function 'get_component_size' ...cal/nvim-data/lazy/bufferline.nvim/lua/bufferline/ui.lua:480: in function 'func' vim/shared.lua:257: in function 'get_components' .../Local/nvim-data/lazy/bufferline.nvim/lua/bufferline.lua:56: in function <.../Local/nvim-data/lazy/bufferline.nvim/lua/bufferline.lua:54>
What did you expect to happen?
should open the multiple buffers
Config
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
keys = {
{ "
Additional Information
...
commit
73540cb
The same thing happened to me I just did "Lazy sync" and I got exactly that error.
Same thing after updating my plugins with Lazy, tried leaving the barebones setup() with an empty table and still fails
vim.tbl_isarray is deprecated, use vim.isarray instead. :help deprecated
stack traceback:
vim/shared.lua: in function 'is_list'
...al/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:119: in function 'get_component_size'
...al/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:652: in function 'tabline'
...local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:74: in function <...local/share/nvim/lazy/bufferline.nvim/lua/bufferline.lua:54>
Press ENTER or type command to continue
E5108: Error executing lua vim/shared.lua:0: vim.tbl_isarray was renamed to vim.isarray
stack traceback:
[C]: in function 'error'
vim/shared.lua: in function 'is_list'
...al/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:119: in function 'get_component_size'
...al/share/nvim/lazy/bufferline.nvim/lua/bufferline/ui.lua:652: in function 'tabline'
Guys, just compile the latest version of neovim,and everything works.
Not sure it's the best fix, but I was able to work around this by:
cd ~/.local/share/nvim/lazy/bufferline.nvim/
git checkout tags/v4.5.3 -b temp-fix
Thanks @ben-bradley that fixed it for me. Will set myself a reminder to undo that in a few days when it presumably gets fixed in latest stable or whatever.
if you don't mind, do you know if I can just rm -rf the ~/.local/share/nvim/lazy/bufferline.nvim/ directory and relaunch nvim to reset it ? or would that break things (I can just mv it first to try)
If you use lazy, I think a nice way to fix this is by going into your lazyvim lockfile and update the bufferline entry to the following commit.
{
"bufferline.nvim": { "branch": "main", "commit": "f6f00d9ac1a51483ac78418f9e63126119a70709" }
}
Then open lazy and run the restore command to reinstall at that commit.
Guys, just compile the latest version of neovim,and everything works.
Just confirming that the lastest nightly does not show this problem either.
Guys, just compile the latest version of neovim,and everything works.
just want to know how can i change my neovim version smoothly? my current ver is NVIM v0.10.0-dev i'll appreciate that!~
just want to know how can i change my neovim version smoothly? my current ver is NVIM v0.10.0-dev i'll appreciate that!~
It's a high learning curve, but I use nix (the package manager) with NixOS and Ubuntu (via Home Manager) with https://github.com/nix-community/neovim-nightly-overlay.
My basic upgrade routine is two commands.
# pull in latest packages
nix flake update
# update nixos
sudo nixos-rebuild --flake ".#$(hostname)" switch
# update ubuntu via home manager
nix run ".#homeConfigurations.$(whoami)@$(hostname).activationPackage" -- build . switch
Guys, just compile the latest version of neovim,and everything works.
Can confirm this works but what about those who installed Neovim by package?
Can you try this out? https://github.com/akinsho/bufferline.nvim/issues/895#issuecomment-2070772951
Guys, just compile the latest version of neovim,and everything works.
just want to know how can i change my neovim version smoothly? my current ver is NVIM v0.10.0-dev i'll appreciate that!~
Don't know how you install nvim before, but I personally just use commands below hope this helps.
// sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim
If you are using packer, you can force to use v4.5.2 until the main version get fixed
use({
'akinsho/bufferline.nvim', branch = 'v4.5.2',
requires = 'kyazdani42/nvim-web-devicons',
after = 'onedark.nvim',
config = function()
require('user/plugins/bufferline')
end,
})
Unfortunately I do not have enough knowledge to help to fix this issue
Anyway thanks for the plugin. I love it.
伙计们,只需编译最新版本的 neovim,一切正常。
It works, thanks!
even with rm -rf the plugin and using lazy to pin on v4.5.3, on NVIM v0.10.0-dev-3005+gaf8500af6-Homebrew I still get the errors.
If you use lazy.nvim or LazyVim, use:
{
"akinsho/bufferline.nvim",
branch = "main",
},
because the latest version v4.5.3 doesn't have the neovim 0.10 fix. It can be removed when a new release includes it.
I created a pull request that appears to solve the issue: https://github.com/akinsho/bufferline.nvim/pull/897
It didn't give me this error when using it as a local plugin
{
dir= '~/personal/bufferline.nvim',
version = "*",
...
Hey everyone, if you're having issues with bufferline.nvim, I've fixed them in my forked repository. You can use it here: [link to your forked repository]
Hello everyone,
I've recently submitted a pull request to the bufferline.nvim repository, addressing this issue . I've made the necessary changes and put in the effort to ensure it aligns with the project's standards.
If you encounter similar issues or have been waiting for this improvement, you can check out my forked repository where the fixes are already implemented: https://github.com/Theyashsawarkar/bufferline.nvim
I'm actively monitoring the pull request and any feedback from the maintainers, so feel free to provide your input or suggestions. Let's work together to enhance the project for the entire community.
Thank you for your attention and support.
That's the beauty of free/libre software, you can fork whenever you want and use your modified version. That said I think it's waaay too soon to decide not to use this repo anymore!
Also had the same issue.. interesting to see that doing the changes manually to the plugin structure seems to be a common thing? To workaround this issue all I did was:
{
"akinsho/bufferline.nvim",
tag = "v4.5.2", -- this N-1 version seems to be running fine
Not sure about each situation above but some manual actions might not get us the expected result.. running "rm -rf" doesn't clean up file lazy-lock.json and reinstalling bufferline might not bring the desired version, or something similar for other actions..
Try running :Lazy and hitting u (to update) or in the worst case x and i (to reinstall) should be enough
I also updated to the latest nvim nightly as mentioned above but the latest version seems to introduce a more annoying issue to me, it's not showing up the "horiz" char from fillchars.. I guess I'm stuck on version v4.5.2 for now
That's the beauty of free/libre software, you can fork whenever you want and use your modified version. That said I think it's waaay too soon to decide not to use this repo anymore!
i am not planning on abandaning this repo but rather trying to give a temporary solution , that's all
Guys, just compile the latest version of neovim,and everything works.
just want to know how can i change my neovim version smoothly? my current ver is NVIM v0.10.0-dev i'll appreciate that!~
I am in pop!_os, an ubuntu derived linux, here is how I install new nvim versions from the appimage file:
Your Neovim executable is located in `/usr/local/bin`.
Bash and your hotkey point to that location when you execute nvim.
The older versions are (or will be) in that folder if you need them for some reason.
To upgrade neovim:
1. In your terminal, navigate to /usr/local/bin,
2. Rename your current `nvim` to `nvim_x.xx`, where `x.xx` is the version number of the old neovim:
`sudo mv nvim ./nvim_x.xx`
3. Download the latest appimage file from https://github.com/neovim/neovim/releases/nightly to `~/Downloads`
4. Move the new appimage file from `~/Downloads` to `/usr/local/bin`
`sudo mv ~/Downloads/nvim.appimage /usr/local/bin/`
5. Change permissions on the new file
`sudo chmod u+x nvim.appimage`
6. Change the name to your prior neovim name (for me it is `nvim`)
`sudo mv nvim.appimage ./nvim`
7. That's it, nvim should work as before with all the hotkeys and in bash, etc.
Hey everyone, if you're having issues with bufferline.nvim, I've fixed them in my forked repository. You can use it here: [link to your forked repository]
Hi! Thanks for this quick fix.
For everyone who may be uncomfortable grabbing some random dude's fork of a popular project and running the code on your computer: the changes are minor and do nothing malicious.
This issue should now be resolved on the latest version of bufferline. It should cover those on 0.9.0 and 0.10.0. I'll close this out now I've merged in fixes and released a new version
@akinsho The latest commit still breaks backwards compatibility despite checks for 0.10.0.
I suggest the following change to cover every API.
diff --git a/lua/bufferline/utils/init.lua b/lua/bufferline/utils/init.lua
index fe19eeb..cbac0c9 100644
--- a/lua/bufferline/utils/init.lua
+++ b/lua/bufferline/utils/init.lua
@@ -253,10 +253,7 @@ end
-- TODO: deprecate this in nvim-0.11 or use strict lists
--- Determine which list-check function to use
-if vim.fn.has("nvim-0.10") == 1 then
- M.is_list = vim.isarray or vim.islist
-else
- M.is_list = vim.tbl_isarray or vim.tbl_islist
-end
+-- Backwards compatibility: nvim-0.10 breaking changes
+M.is_list = vim.isarray or vim.islist or vim.tbl_isarray or vim.tbl_islist
return M
Thanks.
@floation-cutie Of course we all can compile new neovim but in some settings automated tests fail and don't run.
@hinell gave your solution a spin, have completely lost tract of which of these methods is available where but just falling back to whatever exists is hopefully enough. Should be available from 73edc1f2732678e7a681e3d3be49782610914f6b onwards
@akinsho Works like a charm. Thanks!