Further tinkering with diagnostics, following feedback!
* Two lines of context above and below now.
* The caret is included in the line below where possible.
* Syntax highlighting of keywords.
I kinda feel that smart context sizing would be better. What do you think so far?
Doing another iteration on my diagnostics display. I'm reasonably happy with the bold highlighting within the error message.
I'm not sure about the colour on Warning and Error though. It gives the output some visual structure, but arguably the message itself is more important.
TIL rustc has a style guide for suggestions!
https://rustc-dev-guide.rust-lang.org/diagnostics.html#suggestion-style-guide
They recommend avoiding 'did you mean' or 'the following' in favour of direct suggestions and highlighted positions.