galaxyline.nvim
galaxyline.nvim copied to clipboard
Reusable diagnostic function
This changeset exposes a function get_diagnostic(diag_type). It returns a number (unlike get_diagnostic_* functions, which return a formatted string).
I did a tiny refactor here, and:
- Both
get_coc_diagnosticandget_nvim_lsp_diagnosticnow both return a number (previously both returned a string, but only the former appended a space, which was a minor inconsistency). - I've de-duplicated some logic by introducing
get_formatted_diagnostic. It also ensures all values are formatted the same.
This is mostly since I want to be able to use something like get_diagnostic("Info") + get_diagnostic("Hint"). The existing functions return strings, so doing math on them is unnecessarily complicated.
Any feedback here?
Any feedback here?
Last time @glepnir wrote something in Github, he said he was in a hospital. It was 16 days ago. I hope he is fine.
Oh, thanks for the heads up, I had no idea. Hope he gets well.