romgrk / barbar.nvim

The neovim tabline plugin.
2.2k stars 81 forks source link

`require'barbar'.setup()` Does Not Work With Vim-Plug #402

Closed Hou-Rui closed 1 year ago

Hou-Rui commented 1 year ago

Description

When using Vim-Plug, the functionalities of barbar work, but options in require'barbar'.setup() in init.vim does not apply.

Typing :lua require 'barbar'.setup { animation = false, auto_hide = true } interactively does apply the options. It's just options in init.vim that does not work.

Setting g:bufferline (or vim.g.bufferline in Lua heredoc) in init.vim works as expected (but shows a deprecation warning).

Using lazy.nvim works as expected.

To Reproduce

A minimal init.vim to reproduce:

call plug#begin()
Plug 'nvim-tree/nvim-web-devicons'
Plug 'romgrk/barbar.nvim'
call plug#end()

lua << EOF
require 'barbar'.setup {
  auto_hide = true,
  animation = false,
}
EOF

No errors are displayed, the options just does not apply.

Screenshots

A screenshot in a clean Neovim install (taken in Alpine Podman to ensure clean install, but it's the same on my main machine):

Screenshot_20230401_184336

(You can see how auto_hide is not applied here)

Informations NVIM v0.8.3 Build type: Release LuaJIT 2.1.0-beta3 OS: Manjaro Linux 22.1.0

romgrk commented 1 year ago

Can you try #404 for me and see if it fixes this issue? I don't have a vim-plug setup at hand.

Hou-Rui commented 1 year ago

Can you try #404 for me and see if it fixes this issue? I don't have a vim-plug setup at hand.

Thanks, #404 seems to fix it! Please close this when #404 is merged.

SteveLauC commented 1 year ago

I am getting the same behavior with pakcer.nvim, so this problem should be package manager independent I guess.

404 also fixed it for me! Thanks:)