Modified from flymake--mode-line-format.
I only used diags-by-type, you can do stuff with known, running, disabled, etc.
I use unicode for each type of diagnose, flymake-error/warning/note-bitmap would be intersting to use, too.
Don’t read source of flymake--mode-line-format, your sanity will drop.
还可以用汉字代替unicode符号,比如“死”,“警”,“意”对应“error”,“warning”和“note”。
用汉字的话建议在汉字和数字之间加半个空格: M-x insert-char RET thin space RET 。