Closed alex-popov-tech closed 3 years ago
Thanks for the kind words @alex-popov-tech and the steps to reproduce.
I'll try them out and see if I can trigger this bug and investigate from there.
hey, thanks @akinsho ! I will disable it in my config for now, cause its really painful to reload nvim each time, and will be waiting for you.
Btw, it does not reproduce, if I have some file with changes, and run dv
on it BEFORE opening ( so at the time of opening diff buffers it is not present in tabline )
Tbh I use fugitive a lot and have never had that but I don't use the dv
command so I've never tried it or seen it but will see. I won't get any time till tomorrow evening.
It definitely doesn't reproduce if you remove this plugin?
Can you also post the config you use with this plugin
i've created video with that issue https://www.dropbox.com/s/ch8iynljdzgopv3/screencast%202021-01-16%2015-29-18.mp4?dl=0 and here is the config place https://github.com/alex-popov-tech/.dotfiles/blob/master/home/.config/nvim/lua/plugins/init.lua#L73
Thanks @alex-popov-tech that's really helpful, will dig in tomorrow. @carlitux this maybe is the same issue you mentioned in #34. Hopefully with this repro I can fix it now.
@alex-popov-tech I've just tested this out locally and couldn't reproduce it. I figure there is something in your config or system somewhere that you might have, that is triggering this or maybe an iteration with another plugin.
I tried this with a super minimal config and it doesn't reproduce as well. I had only vim-fugitive
and bufferline
installed (as well my theme not necessary though) and started nvim then used Gstatus
to diff vertically another file that wasn't already open.
Can you try a similar thing. Only with vim-fugitive
, bufferline
+/- theme and see if it still reproduces for you, if it doesn't then maybe add things back to see what triggers it 🙏🏿 .
hey @akinsho . thanks for trying ! sure think, will try it myself also!
i think i've found it with just fugitive and bufferline, will record a video and steps now
here it is, i've added some comments right inside https://www.dropbox.com/s/2ipc2jga37150tk/screencast%202021-01-17%2022-16-53.mp4?dl=0
Thanks for digging in @alex-popov-tech, in the example from the video it looks like you have other settings still enabled, I wondering if it may be a specific vim config that is causing this. Can you try only with something like
vim.cmd [[packadd! your-theme]]
vim.cmd [[packadd! vim-fugitive]]
vim.cmd [[packadd! nvim-bufferline.lua]]
vim.cmd [[colorscheme one]]
vim.cmd [[set termguicolors]]
require("bufferline").setup{}
nvim -u <path/to/above/file.lua>
be careful of packer
's packer_compiled.vim
you might need to remove it for this.
a few thoughts so far:
dv
command so not sure if there is setting I don't haveCan you try with the above config and see if you still get the same (sorry for the back and forth, I'm just still not seeing this locally and so I want to try with as little config as possible)
i tried your file, but vim-fugitive
commands are not available oO
I'm not familiar with vim's native package system, do you know why it could happen?
Hmm it could be that things in the autoload
and plugin
dir aren't being loaded are you using any flags like --noplugin
? You can also just use packer in that file and add the 2 plugins using that
sorry, that was packer-compiled thing
yes, i can't reproduce the issue now also...
mab it be some other plugin mess with bufferline?
not sure what to do next, maybe manually packadd
one-by-one and retry issue?
I have a similar problem. Opening a new tab (with tabnew) causes vim to freeze.
Minimal init.lua:
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function()
use {'wbthomason/packer.nvim', opt = true}
use {"npxbr/gruvbox.nvim", requires = {"tjdevries/colorbuddy.vim"}}
use 'akinsho/nvim-bufferline.lua'
end)
vim.cmd "colorscheme gruvbox"
vim.cmd "set termguicolors"
require("bufferline").setup()
@alex-popov-tech I'd suggest add only all your plugins to that file, restart and see if the bug comes back, if it does then comment out half and restart and see if it's still there if it isn't comment the tested half and uncomment the untested. You can steadily narrow it down to the specific plugin that way
If there is no bug with all your plugins installed then it must be a vim setting, in which case I would do a similar process of adding in your vim options using the same method to find at what point the bug comes back
@pianocomposer321 what specific set of steps trigger this issue:
nvim
:tabnew
EDIT: just tried that and it does freeze 👍🏿, I'll dig into it after work tomorrow
@akinsho this info may be of use to you:
FIrst of all, in case you haven't figured it out already, I omitted one step from my comment above, which is calling require("bufferline").setup()
. I was rushing b/c I had somewhere I needed to be. I will edit my comment.
Second, I noticed that neovim only freezes when you haven't opened a file yet. So if you do nvim file.txt
or nvim
, :e file.txt
, and then :tabnew
after loading the file, it does not freeze. I think @alex-popov-tech has a dashboard plugin installed, so that loads a buffer on startup automatically, which means he does not get this same issue, at least that is my theory.
Hope you get this fixed soon, I really like how the plugin looks so far, and I really hope to be able to use it!
Update:
It's not just when starting neovim (i.e, when there's no file loaded at all). It seems to happen any time you run :tabnew
when a [No Name]
buffer is loaded.
Ok I believe I've found a fix for the issue and just pushed a fix. Can you have a go @pianocomposer321, @alex-popov-tech and @carlitux. The issue was that I added functionality to deduplicate buffer names but [No name]
buffers can't be deduplicated so the loop just hangs indefinitely. I'll have a look at that logic in more detail to see if I can refactor it but the fix should work for now 🤞🏿
seems to be working better now, thanks a lot @akinsho ! so happy to continue using your plugin with no freezes ❤️
@akinsho thank you sooo much! I get to uninstall barbar now!
TBH, this plugin feels like barbar redone and made 10x better and more customizable. Plus, with barbar, it would take an additional ~0.5 seconds to load the tabbar after neovim itself loads...that's just unreasonable if you ask me. With this plugin it loads instantly! I also love how this plugin manages tab pages compared to barbar.
Overall, great job! Originally I was hoping that lualine had a tabbar built in like lightline and airline do, but now I'm kinda glad it doesn't, because if they did, I probably wouldn't have checked this plugin out!
@pianocomposer321 agree, much better, simpler, and faster than barbar!
Thanks 😄 that's really nice to hear 🚀
So @alex-popov-tech @akinsho can this issue be closed now?
👍🏾 I'll close this out now thought I'd give @carlitux a chance to try this out, but we can open another issue if it regresses or didn't fix the specific issue he raised
👍🏾 I'll close this out now thought I'd give @carlitux a chance to try this out, but we can open another issue if it regresses or didn't fix the specific issue he raised
I think it is solved I noticed the issue was when [no name]
buffers but I will hire a message if the issue continues. Thank you!
Hey! First things first - thanks for the plugin, its super cool 👍
Now the issue:
Pre-conditions:
Steps:
dv
to show diffs for a fileER: diffs should be viewed AR: nvim freezes