romgrk / barbar.nvim

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

feat: improve offset truncation #416

Closed ttytm closed 1 year ago

ttytm commented 1 year ago

I hoped tuning the offset truncation might fit as a followup to #414

Truncated text get a bit shifted. The reason for this is afaik found on: https://github.com/tobealive/barbar.nvim/blob/f31c82d6667f503de558b033006f1426ee169dc7/lua/barbar/render.lua#L677

Adding + 2 removes the shift. Since it's nice to give a visual clue when text gets truncated, I added the ellipsis character. I followed the assignment to a variable, which was done in another place. But it's called just twice here, so please let me if you prefer to have it changed.

Screenshot_20230402_042800

Screenshot_20230402_042843

ttytm commented 1 year ago

On a sidenote, what sidebar plugin are you using?

It's neo-tree 🙂👍