Skip to content

2.4.8 breaks class properties highlight #260

Closed

Description

@falsefalse
before after
Image Image

something definitely happened to syntax highlighting. @classProp used to be yellow throughout.
why such a dramatic change in approach, if i may ask? thanks!

Activity

  1. deathaxe commented on Jan 5, 2026

    @deathaxe
    Member

    This package provides syntax definitions. It is not responsible for how choosen scopes are highlighted.

    According to CoffeScript syntax specification, @ is a synonym for this and thus its scope was changed from punctuation.definition.variable to variable.language.this.

    1. Variables followed by dot are scoped variable.other.object.
      see:

    2. Leaf members are scoped variable.other.member.

      see:

      - match: '{{identifier}}'
      scope: meta.path.coffee variable.other.member.coffee

    Due to former implementation, this intended distinction was not correctly applied to variables preceeded by @. They unintentionally were scoped variable.other.member, assuming they don't have further members, which has been fixed by v2.4.8

  2. falsefalse commented on Jan 5, 2026

    @falsefalse
    Author

    thank you for the most detailed explanation!

    the theme im using (and themes in general) are built up on definitions the parser gives them, can’t expect theme authors to adjust each time parser changes how it parses, can you.

    i think in coffescript case parsing @ as variable.language.this and therefore making it and following property/method have special “this” colors defies the purpose of @ being a short form of this. note that it doesn’t require the . — idea being that at symbol stands out enough as in @method() or @prop, so it doesn’t need special highlighting by itself, it needs to be distinct from local variables, that’s all.

    and it definitely doesn’t make sense to have three different colors (and italic font style only for at symbol) for @prop.method() case, too many, kinda hard on the eyes.

    what do you think?

  3. deathaxe commented on Jan 6, 2026

    @deathaxe
    Member

    Colors are always a highly personal issue. Hence ST distinguishes syntax definitions from color schemes.

    There are certainly too many possible details for color scheme authors to handle them all in all languages.

    Hence UI: Customize Color Scheme command provides an interface for personal adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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