echasnovski / mini.nvim

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

docs(map): add a "scrollbar with signs" config example #847

Closed dimhatz closed 5 months ago

dimhatz commented 5 months ago

First of all, thank you for this nice set of libraries! I really enjoy using them and also greatly appreciate your goal to keep the code minimal and maintainable. So many plugins today are too complex, resulting in weird bugs and bad performance. Yours are a pleasant exception. I am hoping they will stay that way :)

This PR adds a configuration example for mini.map, that makes it look like a "pure scrollbar", but with signs (see screenshot). I consider it to be a common case, where someone may want a scrollbar (without the map), but with signs that show errors, git added / removed, search hits.

This config may seem a bit "creative", but IMHO it's better to use this, than adding another config option (and complexity).

Cheers!

P.S. regarding when to trigger MiniMap.open(): I have added UIEnter next to VimEnter event, since this one is that worked for me on windows with alacritty.

minimap-scrollbar-fancy

echasnovski commented 5 months ago

Thanks for the PR!

Although visually it looks interesting, this looks like too much text for something that is not a primary use case of 'mini.map'. There is already a "pure scrollbar config" section, which I think should be enough.


Couple of notes:

dimhatz commented 5 months ago

Thank you for your feedback! The snippet you provided had exactly the same visual result. I somehow missed the point of config.symbols.encode and could not see it as the solution.

Also, I totally understand not wanting to add lengthy examples to the documentation (especially if this one is considered niche use case).

Regarding VimEnter vs UIEnter, I will investigate further and open a ticket if needed.