romgrk / barbar.nvim

The neovim tabline plugin.
2.16k stars 81 forks source link

Feature "Unique names when filenames match" only works for the second file (repeatable) #558

Closed ybbond closed 2 months ago

ybbond commented 3 months ago

Description

suppose I have many index.tsx files. for the example, I will use:

  1. home-page/index.tsx
  2. profile-page/index.tsx
  3. listing-page/index.tsx
  4. history-page/index.tsx

first, I open (1), the tabline will become

then I open (2), the tabline becomes

when I open (3), it shows as non-unique

but after I open other file with index.tsx as file name, it all becomes unique

Expected Results

To be fair, the current implementation is semantically correct. It all has "unique" tab name. But it's not what I (and I assume some others also) expect for the behavior

Screenshots

non unique

1

unique

2

Informations

NVIM v0.10.0-dev-2702+g0c0be09ea-Homebrew Build type: Release LuaJIT 2.1.1710088188 Run "nvim -V1 -v" for more info

Iron-E commented 3 months ago

This sounds similar to #2:

[Unique name handling] should give the same output no matter the order of the buffers

romgrk commented 3 months ago

Yeah I know it's been bugging me but not enough to fix it. I'll try to give it a go in the next days.

ybbond commented 2 months ago

thanks @romgrk !