Skip to content

Import names starting with two or more uppercase characters are highlighted as constants #66

@JorelAli

Description

@JorelAli

Java class names which start with two capital letters inside an import statement are colored as constants:

import java.io.File;         // File is colored normally
import java.io.IOException;  // IOException is in blue
import java.util.UUID;       // UUID is in blue

public class MyClass {

  // Code here

}

This is likely caused by this snippet from Java.plist

<dict>
    <key>captures</key>
    <dict>
        <key>1</key>
        <dict>
            <key>name</key>
            <string>keyword.operator.dereference.java</string>
        </dict>
    </dict>
    <key>match</key>
    <string>(\.)?\b([A-Z][A-Z0-9_]+)(?!&lt;|\.class|\s*\w+\s*=)\b</string>
    <key>name</key>
    <string>constant.other.java</string>
</dict>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions