Skip to content

Syntax highlight/colorize the error messages #9328

@XVilka

Description

@XVilka

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.

Take the following example:
ocaml-error

Here the string

(Ppxlib.Location.t * 'a) list -> (Ppxlib.location.t * 'a) list

could 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions