Skip to content

fix(tabufline): implement show_numbers option to display buffer index#550

Open
papier-krieger wants to merge 1 commit into
NvChad:v3.0from
papier-krieger:fix/tabufline-show-numbers
Open

fix(tabufline): implement show_numbers option to display buffer index#550
papier-krieger wants to merge 1 commit into
NvChad:v3.0from
papier-krieger:fix/tabufline-show-numbers

Conversation

@papier-krieger
Copy link
Copy Markdown

Problem

The show_numbers option is documented in nvchad_types/chadrc.lua and appears
in the tabufline config, but was never implemented. When set to true, no numbers
are displayed on the buffer tabs.

Additionally, the number shown was the internal Neovim bufnr (e.g. 6, 12, 24)
instead of the sequential buffer index (1, 2, 3...).

Solution

In style_buf(nr, i, w), the parameter i already receives the correct sequential
index from modules.lua, but was never used. This fix reads opts.show_numbers and
prepends the index i to the buffer tab label when enabled.

Changes

  • lua/nvchad/tabufline/utils.lua: use parameter i to display buffer index when
    show_numbers = true

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

Successfully merging this pull request may close these issues.

1 participant