nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.95k stars 462 forks source link

Feature request: Option to display buffer number instead of buffer index #668

Closed mrcjkb closed 2 years ago

mrcjkb commented 2 years ago

Self Checks

How to reproduce the problem

Execute the following commands:

:edit first
:edit second
:bdelete first
:ls

Outputs:

2 %a   "second"                       line 1

Expected behaviour

The lualine buffer section is consistent with the output of :ls (i.e. the lualine buffer number is 2)

Actual behaviour

The lualine buffer section is not consistent with the output of :ls (i.e. the lualine number is 1)

Minimal config to reproduce the issue

call plug#begin("/home/mrcjk/tmp/.local/share/nvim/plugged")
Plug 'nvim-lualine/lualine.nvim'
call plug#end()
lua << END
require'lualine'.setup {
  tabline = {
    lualine_b = {{'buffers', mode = 2}}
  }
}
END
mrcjkb commented 2 years ago

Nevermind. I just realised that mode=2 is defined as "show buffer index", not buffer number. It would be neat to have a config to display the buffer number instead of the index though (maybe via a separate option). I will change this issue to a feature request...