echasnovski / mini.nvim

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

[mini.deps] Visual distinction of breaking commits in confirm buffers? #905

Closed pkazmier closed 4 months ago

pkazmier commented 4 months ago

Contributing guidelines

Module(s)

mini.deps

Description

What are your thoughts about providing a highlight group to be used for breaking commit messages that use the conventional commits indicator (!)? I realize not all projects use conventional commits, but I really miss this nice user experience enhancement from the lazy package manager. It's just too easy to miss important commits in the confirm buffers.

I was simply going to add a new pattern with mini.hipatterns to remedy in my personal config, but then realized I should pose the question here as others migrating from lazy might also miss this feature. If you don't believe it belongs in mini.deps given the pursuit of simplicity, at least there is now a closed issue with an alternate solution.

echasnovski commented 4 months ago

Thanks for the suggestion!

This is an interesting feature which I am open to add if it will end up being easy code-wise. It was suggested during beta-testing, but I was not so keen on conventional commits back then.

I'll look into it.

echasnovski commented 4 months ago

This is now done on latest main through MiniDepsMsgBreaking (links to DiagnosticWarn).

Originally I envisioned highlighting similar to MiniDepsChange{Add,Remove} (i.e. highlight first line of log entry), but that proved to be not easy to do with Vim's syntax capabilities. So it now only highlights message, which is not a bad thing per se (added/removed log entries can still be visible with green/red highlighting).

Thanks again for the suggestion!

pkazmier commented 4 months ago

Thank you. Looking forward to the next breaking change in an update 😄

echasnovski commented 4 months ago

Thank you. Looking forward to the next breaking change in an update 😄

This is easily achievable 😈

How long ago did you update? There was this one in 'mini.nvim' recently. Scratch that, it is obviously impossible to be highlighted as it needs later commit in order to be highlighted.

echasnovski commented 4 months ago

Just now witnessed the fruit of my labor in action. Updated plugins and was a bit surprised to see some different highlighting. Only to remember that breaking changes are now highlighted differently. Thanks again for asking for this change!

pkazmier commented 4 months ago

I just woke up, saw your note here, and just updated as I, too, hadn't seen any breaking changes since you added the feature. But with neodev being deprecated, I was able to quickly see those changes amongst a lot of noise from conform changes. Looks great! Thank you.