Code style is breaking

Issue #498 duplicate
Julio Enrique created an issue

When I try to open any class file, it first shows with the code style almost ok, and then after a second the code style breaks, removing the bold from the system classes (for classes such as list, map and so on).

Also, when the class is opened with the code style ok, the custom objects bold is not shown ok.

Attached screenshots with when the class is first opened, and the changes that are done automatically after the open.

Comments (3)

  1. Scott Wells repo owner

    Julio, this is actually intentional. The initial syntax highlighting that you're seeing is simple styles based on tokens from the lexer. Shortly thereafter a secondary pass is made to provide contextual styling so that things like constants (static/final modifiers) are styled distinctly. The second pass first strips all identifiers of formatting, then applies any relevant contextual highlighting. This is consistent with how IntelliJ IDEA's Java syntax highlighter works, e.g.:

    SyntaxHighlighting.png

    There's another enhancement request, #117, for a configurable Apex syntax highlighter in which I'd also include the ability to specify how type identifiers in general and system type identifiers in particular should be highlighted.

  2. Log in to comment