mini.nvim icon indicating copy to clipboard operation
mini.nvim copied to clipboard

Add support for user defined diagnostic signs

Open suliatis opened this issue 11 months ago • 1 comments

Contributing guidelines

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.

suliatis avatar Mar 24 '24 14:03 suliatis

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.

echasnovski avatar Mar 24 '24 14:03 echasnovski

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.

echasnovski avatar May 31 '24 12:05 echasnovski

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. Screenshot 2024-05-31 at 8 41 54 AM

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). Screenshot 2024-05-31 at 8 57 07 AM

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 😄 ). Screenshot 2024-05-31 at 8 58 23 AM

pkazmier avatar May 31 '24 13:05 pkazmier

Very nice!

Now I don't have to override the whole diagnostic function anymore in order to have colored diagnostic signs. Thanks!

1717183012

abeldekat avatar May 31 '24 19:05 abeldekat