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

Undefined variable: g:bufferline #29

Closed
mawkler opened this issue Oct 31, 2020 · 2 comments
Closed

Undefined variable: g:bufferline #29

mawkler opened this issue Oct 31, 2020 · 2 comments

Comments

@mawkler
Copy link
Collaborator

mawkler commented Oct 31, 2020

I tried to disable the close buttons using g:bufferline.closable but I'm getting the error E121: Undefined variable: g:bufferline when Neovim launches. What am I doing wrong? The following is my minimal config:

call plug#begin('~/.vim/bundle')
Plug 'kyazdani42/nvim-web-devicons'        " Required by barbar.nvim
Plug 'romgrk/lib.kom'                      " Required by barbar.nvim
Plug 'romgrk/barbar.nvim'                  " Sexiest buffer tabline
call plug#end()

let g:bufferline.closable = v:false
@romgrk
Copy link
Owner

romgrk commented Oct 31, 2020

Barbar hasn't run yet so it's not defined yet. You can define it yourself with let bufferline = { 'closable': v:false }, barbar will respect that setting because he's polite. Oh and also the latest version of barbar doesn't depend anymore on lib.kom so you can delete the line.

@mawkler
Copy link
Collaborator Author

mawkler commented Oct 31, 2020

Oh of course! I figured doing let g:bufferline = { 'closable': v:false } would remove all other default settings in bufferline but I see now that barbar.nvim is smarter than that. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants