romgrk / barbar.nvim

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

Netrw Directory Listing buffer does not get close with :bufferclose #433

Closed sandeep-ad closed 1 year ago

sandeep-ad commented 1 year ago

Preamble (you can delete this section):

Description

Unable to close buffer which is opened for Netrw directory listing.

To Reproduce

open a directory in nvim now select and open a file, which should open in new buffer Finally try to close the directory listing buffer using :bufferclose command

This will not close the buffer.

Screenshots image

Informations NVIM v0.8.3

romgrk commented 1 year ago

Duplicate of #45

@Iron-E didn't we have a netrw entry in the Known Issues section of the readme?

romgrk commented 1 year ago

Wait no it's not #45, but we have an issue around for the netrw bug.

romgrk commented 1 year ago

82 is where you'll find more info. Summary: netrw is low quality plugin that has bugs, you shouldn't use it and we won't support it. I think there is a workaround somewhere in #82 if you insist on using it though.

romgrk commented 1 year ago

I use this one, I recommend it: https://github.com/justinmk/vim-dirvish

Iron-E commented 1 year ago

@Iron-E didn't we have a netrw entry in the Known Issues section of the readme?

That particular issue in the README was about :BufferNext/:BufferPrevious which was fixed in #369 so I removed that notice. This is a different issue it seems— we should add a more general notice about Netrw back


tl;dr: @sandeep-ad this is a bug with netrw. It doesn't properly report its own buffer with bufnr, so it is impossible for us to delete it. (try :bdelete <dir> with netrw, not even Vim's builtin functions work). Use any filetree plugin instead.

romgrk commented 1 year ago

we should add a more general notice about Netrw back

"Netrw sucks."