Git Product home page Git Product logo

bufferline.nvim's People

Contributors

akinsho avatar bradsherman avatar casonadams avatar drscream avatar ellisonleao avatar gabmus avatar github-actions[bot] avatar horseinthesky avatar jackielii avatar misterfishup avatar ntbbloodbath avatar nullchilly avatar otavioschwanck avatar prince213 avatar ramezgerges avatar ray-x avatar reptarsrage avatar rwblokzijl avatar sindrets avatar stevanmilic avatar taaqif avatar terrifictable avatar toh995 avatar ttytm avatar ursescu avatar utkarshgupta137 avatar vinibispo avatar wassimk avatar xiyaowong avatar xwjdsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bufferline.nvim's Issues

show only tabs

is it possible configure the plugin to show only tabs?
like let g:airline#extensions#tabline#enabled = 1 in airline

disable separator

hi again !
is there an ability to disable separators completely?
im trying to achieve minimal ui, and want to see just icon and name

Issues when setup

Getting this error when calling setup

terminated by signal SIGSEGV (Address boundary error)

When shows something like this

Screenshot from 2020-07-12 19-49-50

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

Help: Only vim's tabline show up?

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?
Screenshot 2021-03-13 at 12 26 58

What did I miss?

Edit: I use nvim 0.5

Doesn't run on startup, have to re-source init.vim

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.

Bug: attempt to call field 'is_test' (a nil value)

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.

Changing background of unselected buffer doesn't work

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",
\        };
\    },
\}

Highlight names from theme do not seem to be getting used

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 ?

"[nvim-bufferline] is not a valid highlight group"

(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.

Screen Shot 2020-12-26 at 4 51 20 PM

I assume I'm missing something really obvious but I'm not sure what it is. I'd appreciate any tips.

Highlight for free tab space

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.

image

Buffer switch have a delay

There will be a significant delay when buffer switching when use leader number. see gif leader 1 is slow.. And reduce the space of buffer number with buffer name. I want my colorscheme support nvim-bufferline. need provide all highlightgroup
test

Feature Request: Additional Mappings to move between buffer

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

  • Additional mappings to switch between buffers like bn and bp within the current tab only.
  • Show only buff tabs for current buffer only.

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

tab height and tab styling

how do I increase tab height? also changing tab styling to this :
image didnt find anything about tab styling in the example configs

Cannot style seperator background color when seperator_style = "slant" is configured

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.

Preview:
image

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",
    }
}

How can i set the numbers on the right not to show?

2021-03-11_14-19

I tried setting:

require"bufferline".setup {
  options = {
    view = "multiwindow",
    numbers = 'none',
    number_style = '',
  }
}

EDIT: the separator_style won't work as well, i tried setting it like this right now:

2021-03-11_14-30

And the tab styling remains the same, the default one.

[feature request] highlight the entire buffer background

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! 😁

Error executing lua [string ":lua" ]:1: module 'bufferline' not found

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()

Buffers not working as expected

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?

Buffer grouping

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

Unique buffer names does not work

I'm expecting both init.lua files are prefixed with folder names in the buffers but apparently, they are not.

Do I need to enable it somehow? I didn't find it in the docs.

Screenshot:
image

Unable to configure highlighting

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.

Close buffer with rightclick

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:

  • Safe space by removing the close-symbol
  • Less visual clutter/noise
  • Closing buffer becomes easier because you dont have to click exactly on the small area of the close-symbol

Attempt to index global 'Buffer' (a nil value)

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.

plugin makes vim freeze with 100% load cpu

Hey!
First things first - thanks for the plugin, its super cool πŸ‘

Now the issue:

Pre-conditions:

  • install bufferline & vim-fugitive

Steps:

  • in git repo go to file X, make some changes, save buffer
  • call :G to view git status ( file X should be there )
  • place cursor on file X line and type dv to show diffs for a file

ER: diffs should be viewed
AR: nvim freezes

Special characters in file name are not escaped properly.

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.

How to deal the confict with lightline?

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.

The file's icon only shows left half in Windows Terminal

屏幕ζˆͺε›Ύ 2021-01-23 142118
vs code's terminal
屏幕ζˆͺε›Ύ 2021-01-23 142142
Windows Terminal

I try to change the code to move the white space right before the filename to the position right after the icon. And then the icon shows properly in Windows Terminal. But I am not sure whether it will have influence on other functions.
图片

No longer works?

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 get this error on startup:
image

Add command to sort buffers

Add possibility to sort buffers on the fly

Expose a module function to sort buffers. I think even creating some commands for it would be a good idea too, as well as keymapping examples.

E.g.:

image

After sorting by directory:

image

weird highlights in tabs

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,...
image

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 ^^'

show bufferline only when two or more buffers are open

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.