romgrk / barbar.nvim

The neovim tabline plugin.
2.23k stars 83 forks source link

netrw is not being show on buffer list, so is impossible to BufferPrevious and BufferNext #367

Closed otavioschwanck closed 1 year ago

otavioschwanck commented 1 year ago
image

EDIT: Is showing on the barbar but doesn't highlight and throws that error

Iron-E commented 1 year ago

I've never used netrw, I'll give it a try

Iron-E commented 1 year ago

I've opened #369 to address this issue. If that doesn't work for you, I have other things we can try. Just let me know!

otavioschwanck commented 1 year ago

I've opened #369 to address this issue. If that doesn't work for you, I have other things we can try. Just let me know!

Worked!

romgrk commented 1 year ago

https://github.com/romgrk/barbar.nvim#netrw

I'm pretty sure this is a duplicate of #82.

romgrk commented 1 year ago

I wouldn't merge #369, barbar uses the standard vim mechanism of listed/unlisted buffers by design. Netrw is buggy and subpar, imho we can't and shouldn't fix its bugs in barbar. Doing so will cause other issues, because showing unlisted buffers will end up showing buffers the user doesn't want to see.

I would recommend switching to a decent file explorer instead of netrw, e.g. https://github.com/justinmk/vim-dirvish.

Iron-E commented 1 year ago

I wouldn't merge #369, barbar uses the standard vim mechanism of listed/unlisted buffers by design

I wasn't crazy about that solution either (that being the reason default behavior remained unchanged). Perhaps instead of hide.unlisted, should I add a fallback for when :BufferNext doesn't find the current buffer in the buffer list? E.g. move to:

  1. The alternate buffer, if it is listed
  2. state.buffers[1]
otavioschwanck commented 1 year ago

I wouldn't merge #369, barbar uses the standard vim mechanism of listed/unlisted buffers by design

I wasn't crazy about that solution either (that being the reason default behavior remained unchanged). Perhaps instead of hide.unlisted, should I add a fallback for when :BufferNext doesn't find the current buffer in the buffer list? E.g. move to:

  1. The alternate buffer, if it is listed
  2. state.buffers[1]

i like this solution

Iron-E commented 1 year ago

i like this solution

Sounds good, I'll refactor #369 in a bit.