echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.47k stars 175 forks source link

feat(mini.files): Add customization for title position and new highlight for modified buffer window #937

Closed augustocdias closed 1 month ago

augustocdias commented 1 month ago
echasnovski commented 1 month ago

Thanks for the PR!


Modification of floating window title should be achieved the same way as suggested window customization and not through special option.

Right now autocommand approach is not really straightforward, I'll look into it. But I don't think changing title position is a good UI, so it won't be top priority.


If I understand correctly, MiniFilesModified is intended to highlight the whole buffer inside window? If yes, then I think this is too much visual feedback. Changing only border highlight was a deliberate choice.


Closing as no suggested functionality aligns well with 'mini.files' design.

augustocdias commented 1 month ago

Yeah. The auto command also adds overhead and complexity that I'd like to avoid in my config. Maybe exposing a callback would be a better option

echasnovski commented 1 month ago

Using autocommands is and will be a suggested way to customize how windows look in 'mini.files'. This is mostly to avoid having to expose too much configuration in setup() while allowing much more flexibility.

echasnovski commented 1 month ago

There was an issue with title_pos not being preserved after windows are refreshed, so setting it in MiniFilesWindowOpen was not possible (unlike border setting).

This should be fixed on latest main. The suggested approach to tweaking both border and title_pos is now better documented.