j-morano / buffer_manager.nvim

A simple plugin to easily manage Neovim buffers.
MIT License
232 stars 12 forks source link

Show buffer indicators #28

Closed thedenisnikulin closed 4 months ago

thedenisnikulin commented 11 months ago

When running :ls, you can see buffer indicators (flags), but this plugin doesn't have them so it's quite hard to navigate between buffers. I sometimes clean unused buffers, but I need to know whether they were modified or not so I can safely close them. I really like the idea of this plugin, but lack of buffer indicators make it quite inconvenient to use.

j-morano commented 11 months ago

Hello. Thanks for the feedback. I have a question. Are you interested in seeing all the indicators or just the modified buffer? Because if you are only or mainly interested in that one, the plugin provides a way of highlighting modified buffers. You just have to configure the highlight group BufferManagerModified in your config. For example:

hi BufferManagerModified ctermfg=19 guifg=#0000af

Anyway, thank you for opening the issue, because I just realized that this information is not available in the README.

thedenisnikulin commented 11 months ago

Hello, thanks for the reply! Honestly for now seeing only information about modified buffer will do. Didn't know that I can highlight it, thanks for the tip, gonna use it. It would be really great though to have all the buffer indicators available in the future releases, I believe it will make it fully compatible with how vim works (and you never gonna be running :ls).

j-morano commented 5 months ago

Hello. I created the branch buffer-indicators with the feature. Please let me know if it is working correctly for you.

thedenisnikulin commented 4 months ago

Hello, yes, looks good!

image

As an idea, how do you think about putting indicators to the front of buffer name? It should be easy because there's a fixed number of maximum indicators per buffer. It would give a nice aligned view. Like :buffers command:

image

j-morano commented 4 months ago

Added another commit. Now you can choose between 'before' and 'after' filenames. Please check again if it is working for you.

thedenisnikulin commented 4 months ago

yeah, looking great now!

thedenisnikulin commented 4 months ago

should I close it now or wait for you to merge into master?

j-morano commented 4 months ago

Thank you for your help with beta testing. I will merge.