akinsho / bufferline.nvim Goto Github PK
View Code? Open in Web Editor NEWA snazzy bufferline for Neovim
License: GNU General Public License v3.0
A snazzy bufferline for Neovim
License: GNU General Public License v3.0
EDIT: so this might be because of my theme
is it possible configure the plugin to show only tabs?
like let g:airline#extensions#tabline#enabled = 1
in airline
hi again !
is there an ability to disable separators completely?
im trying to achieve minimal ui, and want to see just icon and name
Getting this error when calling setup
terminated by signal SIGSEGV (Address boundary error)
When shows something like this
and updates colorscheme
Error detected while processing ColorScheme Autocommands for "*":
Failed setting BufferLineSelectedIndicator highlight, something isn't configured correctly
Vim(highlight):E411: highlight group not found: BufferLineSelectedIndicator
Failed setting BufferLineModifiedSelected highlight, something isn't configured correctly
Vim(highlight):E411: highlight group not found: BufferLineModifiedSelected
Failed setting BufferLineModifiedInactive highlight, something isn't configured correctly
Vim(highlight):E411: highlight group not found: BufferLineModifiedInactive
That looks pretty cool and it is really useful.
Thx a lot~
This sounds stupid, but how do I activate this plugin?
After install Plug 'akinsho/nvim-bufferline.lua'
and require'bufferline'.setup{}
, I only saw the vim's tabline show up. It only show the title of the active buffer in a tab, even though the buffer list show multiple buffer?
What did I miss?
Edit: I use nvim 0.5
Currently if you set sort = 'directory'
selecting CycleNext
or the reverse direction selects the wrong buffer π
Not very familiar with how Lua plugin calls work. I tried adding the require
from the help/manual to my init.vim, and I've tried a number of other variations including:
require("bufferline").setup{}
and
lua << EOF
require("bufferline").setup{}
EOF
but none of them work on startup. They all, however, work when I re-source my init.vim after startup.
I'm sure I'm doing something dumb, just dunno what.
check barbar.nvim it has buffer pick mode the behavior like easymotion , can jump to buffer by letters. code in here.
https://github.com/romgrk/barbar.nvim/blob/master/plugin/bufferline.vim#L478
preview in here https://github.com/romgrk/barbar.nvim#jump-to-buffer
On the latest Neovim nightly and with the latest version of the Bufferline, when starting a new session, presented with the following error:
E5108: Error executing lua ...nvim/plugged/nvim-bufferline.lua/lua/bufferline.lua:45: attempt to call field 'is_test' (a nil value)
The error might be as a result of code changes in the past 3 or so days.
The terminal buffer tab would become hidden if I switched to another buffer. Is there any way to prevent it from doing so?
In the following minimal vimrc I am trying to change every background to red. It works for some backgrounds like for the selected buffer and the tabs but not for the unselected buffers:
set runtimepath+=~/.local/share/nvim/plugins/nvim-bufferline.lua/
set termguicolors
lua require'bufferline'.setup {
\ highlights = {
\ bufferline_tab = {
\ guibg = "red",
\ };
\ bufferline_tab_selected = {
\ guibg = "red",
\ };
\ bufferline_buffer = {
\ guibg = "red",
\ };
\ bufferline_buffer_inactive = {
\ guibg = "red",
\ };
\ bufferline_modified = {
\ guibg = "red",
\ };
\ bufferline_separator = {
\ guibg = "red",
\ };
\ bufferline_selected = {
\ guibg = "red",
\ };
\ },
\}
I have installed bufferline and when I try to do a :checkhealth
, neovim is stuck for ever.
If I remove bufferline :checkhealth
is working
I have NVIM 0.5.0-dev
I am trying to do some tweaks to get the highlighting right and I don't want to hard code the colour values. Instead I want to derive the colours from the theme that I am using. For example, these are some highlight groups in my theme file:
" call s:hi(item, fg, bg, cterm, gui)
call s:hi('Normal' , 249 , s:bg , 'None' , 'None')
call s:hi('Cursor' , 235 , 178 , 'bold' , 'bold')
In the config file for the plugin, I set the colours as such:
buffer_selected = {
guifg = normal_fg,
guibg = cursor_bg,
gui = "bold,italic"
},
This doesn't seem to have any effect. The only way at the moment to get the colours to change is by hard coding the values. Can you please clarify how exactly one can derive the colours from the theme ?
(sorry, published the issue too early with a blank description)
I tried to modify the color of the tab bar at the top using the instructions in the README with small modification. Here's my entire nvim-bufferline section from init.nvim
lua require'bufferline'.setup {
\ options = {
\ show_buffer_close_icons = false,
\ max_name_length = 40
\ },
\ highlights = {
\ fill = {
\ guifg = 'black',
\ guibg = '#b2b2b2'
\ };
\ },
\ }
The configuration works, the colors do change, but I get a " is not a valid highlight group" error on startup.
I assume I'm missing something really obvious but I'm not sure what it is. I'd appreciate any tips.
Hi, hope you're doing well. What is the selector to use in bufferline setup for the black empty space in the image? Been trying to set it but don't know exactly which one it is. Maybe some documenting can be done for what each selector such as Tab or Bufferline visible is? Sorry, I'm a bit of a noob.
Hi @akinsho, hope you're doing well. I'm starting to use vim-dispatch to connect to servers, but I noticed that when I do so a new buffer get listed.
Is there a way to skip those buffer from getting listed? thanks
Hey @akinsho , thanks a lot for this awesome plugin, I've got the chance to try it while building my neovim configuration from scratch with lua. I like how responsive and well made it is.
If it possible and absolutely easy to accomplish
The reason that this might be a great feature for nvim-bufferline.lua users, is that it would give users the ability to have a workspace like experience when working with buffers. Each tab can have its own buffer where navigation happens only between them.
Thanks
Hay @akinsho, hope your doing great. I wonder if it is possible somehow to hide buffer from other tabs and making the buffer line showing only a tab buffer?
Thanks
I've added fill guibg color and it doesn't work while seperator_style = "slant"
.
I also tried to set background and seperator styles with no success.
I try to get #282828
as background color as it fits style much better than black background.
As you can see, seperator backgrounds are black and not #282828
. Right side has correct color applied. Background color changes when I switch to light theme, so there should be something that I could configure.
My current configuration:
vim.o.termguicolors = true
require "bufferline".setup {
highlights = {
fill = {
guibg = "#282828"
},
},
options = {
modified_icon = "β",
left_trunc_marker = "ο¨",
right_trunc_marker = "ο©",
max_name_length = 25,
max_prefix_length = 25,
enforce_regular_tabs = false,
view = "multiwindow",
show_buffer_close_icons = false,
show_close_icon = false
separator_style = "slant",
}
}
I get the following error when I try to add a lua file that contains the following require'bufferline'.setup()
in order to load this plugin.
E5113: Error while calling lua chunk: /home/paradox_supreme/.config/nvim/lua/bufferline.lua:1: loop or previous error
loading module 'bufferline'
Hi!
First of all, thank you for this awesome plugin!
I am wondering if it is possible to highlight the entire background of a buffer when it has any errors, warnings, infos or any diagnostics.
From what I have tried, I succeded in having a entire background color if the buffer has no errors and so on by setting buffer_selected
, indicator_selected
...
But when an error appears in the buffer, only the filename's bg changes color.
So I was wondering if something like buffer_selected_all
, error_selected_all
would be possbile.
Thanks again for this awesome plugin! π
Is there a way to hide buffers and show only tab pages ?
Error:
Error executing lua [string ":lua" ]:1: module 'bufferline' not found
Solution:
I'm using vim-plug to install bufferline. previously I had the setup call within plug#begin
and plug#end
blocks. call lua require'bufferline'.setup()
after plug#end
fixed the issue
call plug#begin()
Plug 'akinsho/nvim-bufferline.lua'
call plug#end()
set termguicolors
lua require'bufferline'.setup()
It seems that the way bufferline handles buffers is not quite the same as how it normally works.
When I use the mouse to close tabs, it works as expected. However, when I use :q
to close the buffer, bufferline doesn't reflect that. When I use the mouse to close the tab, it doesn't look like it actually closes the buffer. Any idea if it's possible to sync bufferline with the acutal buffer list? Or am I configuring this wrong?
One thing I've thought a lot about since I discovered emacs' Centaur tabs is it's buffer groups I was initially against the idea since it seemed like an extra layer on top of vim that doesn't really exist natively. But with sorting added we already essentially have this layer on top of nvim π€ .
Anyway a first pass at this functionality would be added a way of first creating a group, then assigning buffers to a group. Visually groups would be clustered together +/- a way to separate them from each other or indicate that a buffer was in a particular group
The primary value of the groups would be visually seeing similar things clustered e.g. test files or some other dimension for sorting that isn't just an extension or directory. It would also have the benefit of allowing a user to interact with those buffers as a group
hey!
is there an ability to add hl to modified buffer in the list? like to have modified yellow, non-modified white, current blue
Hi! I am trying to change the highlight settings and when copying any parameter and the documentation, I get the error:
vim.cmd('packadd nvim-bufferline.lua')
require'bufferline'.setup{
highlights = {
fill = {
guifg = comment_fg,
guibg = separator_background_color
},
};
}
Error detected while processing ColorScheme Autocommands for "*":
Failed setting BufferLineFill highlight, something isn't configured correctly
Vim(highlight):E411: highlight group not found: BufferLineFill
Am I doing something wrong? I have it installed in opt
dir and my configuration in lua.
I think it would be great if it would be possible to close a buffer by clicking on it with the right mouse-button. This would have the following benefits:
Hi!
I tried your plugin, but have an error:
E5108: Error executing lua .../pack/plugins/start/nvim-bufferline.lua/lua/bufferline.lua:499: attempt to index global 'Buffer' (a nil value)
I just cloned your plugin to start
folder (plugins that loaded automatically via built-in Neovim package manager), opened Neovim and executed lua require'bufferline'.setup()
.
If I put lua require'bufferline'.setup()
to my configuration It does nothing, so I executed it after startup to see the error.
I using latest Neovim nightly.
I make a floatwindow to show some command in terminal. It always show in bufferline when I close this floatwindow.
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
When the file name contains special characters, the buffer line will not present the proper name. Such as a%.txt
is shown as aa%.txtxt
. This issue is quite subtle and rare(only when special characters exist), but I would be grateful if it got fixed.
Hello, If I has plugin lightline
, the tabline will use lightline's tabline other than nvim-bufferline.lua, how to deal it?
I want to use lightline's status line and nvim-bufferline.lua's tabline/bufferline.
Recently did a :PlugUpdate
and buffer tabs were not showing up.
my minimal .vimrc (.vimrc-test). I launch with nvim -u ~/.vimrc-test
call plug#begin("~/.vim" . '/bundle')
Plug 'akinsho/nvim-bufferline.lua'
call plug#end()
Result of nvim --version
NVIM v0.5.0-dev+1229-g91cdc1198
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/loshjawrence/clones/neovim/build/config -I/home/loshjawrence/clones/neovim/src -I/home/loshjawrence/clones/neovim/.deps/usr/include -I/usr/include -I/home/loshjawrence/clones/neovim/build/src/nvim/auto -I/home/loshjawrence/clones/neovim/build/include
Compiled by loshjawrence@Lappy486
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/share/nvim"
Run :checkhealth for more info
Also when I try to run with my normal .vimrc that has this configuration
" nvim-bufferline
:lua << EOF
local hlColor = "GreenYellow"
require'bufferline'.setup{
-- override some options from their defaults
options = {
tab_size = 12,
max_name_length = 40,
show_buffer_close_icons = false,
},
highlights = {
buffer_selected = {
guifg = "Black",
guibg = hlColor,
gui = "bold",
},
-- Accent the split buffer thats not selected
buffer_visible = {
guifg = hlColor,
},
},
}
EOF
I've been trying to figure out how the highlights in the tab bar work fully, but I can't figure out how to deal with the diagnostic-indicator text being a different background and foreground than the rest of the tab,...
I'd like this to have the same background as the rest of the tab, obviously... Idk if this is a bug or a "I don't get it", but either way, help would be greatly appreciated ^^'
Hi. First of all thank you for the great plugin. Out of all bufferline-plugins I finally found one which does a good job. I especially like the mouse support. Would it be possible to show the bufferline only when two or more buffers are open?
We can currently choose to not have the close_icons for the individual tabs. However, as far as I can see, there is not way to opt out of having the close button on the far right.
https://github.com/akinsho/nvim-bufferline.lua/blob/6f104eab57f0c7f1241e4ba0da12c9d1362f589f/lua/bufferline.lua#L543
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.