-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Syntax highlight/colorize the error messages #9328
Description
Sorry if duplicate - I remember it was discussed somewhere, but found nothing in the opened issues, thus this feature request.
To date many various languages perform a simple syntax highlight or colorize their error messages somehow, to make them more readable. While the text part of the message nowadays is clear enough in most of the cases, adding basic syntax highlight for the reported types or lines of code will be beneficial for a quicker understanding of the problem.
Here the string
(Ppxlib.Location.t * 'a) list -> (Ppxlib.location.t * 'a) listcould be highlighted according to the OCaml syntax
Same with the expected type expression.
Also in the string
Type Ppxlib.Location.t = Warnings.loc is not compatible with type int
both Ppxlib.Location.t = Warnings.loc and int can be of a different color from the rest of the message.
Implementing this will allow to understand the error from the first glance.
