mini.nvim
mini.nvim copied to clipboard
Add support for user defined diagnostic signs
Contributing guidelines
- [X] I have read CONTRIBUTING.md
- [X] I have read CODE_OF_CONDUCT.md
Module(s)
mini.statusline
Description
If the user defined diagnostic signs are available via vim.fn.sign.setdefined
or vim.diagnostic.config
, then use it show diagnostic count in the diagnostic statusline provider.
I think this would fit into mini.statusline nicely without adding too much extra complexity.
I'm planning to create a pr with this change if you agree.
Thanks for the suggestion!
Yes, I think this is a reasonable thing to add.
I'm planning to create a pr with this change if you agree.
Please don't. There is a planned update coming to 'mini.statusline' in the foreseeable future, in which I'll also resolve this suggestion.
This is now finally possible on latest main
.
Although, unfortunately, not as straightforward for users as only configure vim.diagnostic.config({ signs = { text { ... } } })
. For actual reasons see comment message at 4b397915a4cacba1c9fe8033f0ff048d8f377a29.
Nice! Although after trying a couple of variants:
Icons instead of E, W, H, I
Too many icons for my taste. I prefer the less-is-more approach used by mini's default settings where an icon is used to introduce a section of the statusbar.
Color versions of E, W, H, I
I would define new hlgroups to color match the background if I liked this, but I prefer monochromatic approach used by mini's default settings. The only place I like color in my statusbar is to highlight the filename if the buffer has been modified (in my screenshot it's green).
Original
It's nice to have the option to customize of course, but I find myself resorting back to the defaults as I find the minimal aesthetics more pleasing to my eye (although oddly I still use icons in the statuscolum, but maybe I'll revisit that right now 😄 ).
Very nice!
Now I don't have to override the whole diagnostic function anymore in order to have colored diagnostic signs. Thanks!