atom / one-dark-syntax

Atom One dark syntax theme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP highlighting messed up in Atom Beta (1.21.0)

martinbean opened this issue · comments

Prerequisites

Description

The syntax highlighting of PHP files seems to be messed up in Atom Beta (version 1.21.0), compared to previous, stable versions of Atom.

Steps to Reproduce

  1. Open a PHP file in Atom (stable). Syntax highlighting is expected.
  2. Open the same file in Atom Beta. Syntax highlighting is different.

Expected behavior: Same syntax highlighting as the stable version of Atom.

Actual behavior: Difference in syntax highlighting when compared to stable version of Atom.

Reproduces how often: Every time.

Versions

1.21.0

Additional Information

Screen-shot of PHP file in stable version of Atom:

screen shot 2017-09-12 at 21 59 20

Screen-shot of same PHP file in Atom Beta:

screen shot 2017-09-12 at 22 00 06

Differences:

  • Request in imported namespace is yellow, instead of grey like the rest of the FQCN.
  • Opening brace for class is yellow.
  • Response in DocBlock parameter type-hint is yellow, instead of grey like the rest of the type-hint.
  • The closing brace of methods is yellow, instead of grey like the opening brace.
  • The call to the global view() function is blue, whereas it’s grey in the stable version of Atom.

I’ve only tried this file, so I don’t know if there are any more syntax highlighting inconsistencies between the stable and beta versions of Atom.

Seems the trait syntax messes up further syntax highlighting too:

screen shot 2017-09-12 at 22 20 03

I believe both issues have already been fixed, and I will be looking into creating a patch release.

@50Wliu Awesome! Thanks for addressing this Issue so quickly.

Is there an ETA on the patch version?

These styling issues have made their way in the stable version of Atom for me now 😢

I can't commit to a timeframe, but I can confirm that a hotfix will be released for these issues.

Looking forward to it, @50Wliu . I can confirm 1.20.0 is also affected.
screen shot 2017-09-14 at 20 14 49

Hey, i'm still having this issue.
Didn't found any update yet that fixed this.

I made a little css fix to go back what I was used to.
Just add the css code to the atom styling.

CSS Fix

/**
 * Fix for PHP Language
 */
.syntax--use .syntax--class.syntax--php,
.syntax--method-call .syntax--entity.syntax--name.syntax--function,
.syntax--punctuation.syntax--definition.syntax--class.syntax--bracket.syntax--curly.syntax--php,
.syntax--punctuation.syntax--definition.syntax--class.syntax--bracket.syntax--curly.syntax--php,
.syntax--namespace + .syntax--class.syntax--php {
    color: #abb2bb;
}

.syntax--comment .syntax--class.syntax--php {
    color: #5c635f;
}

Before

before

After

after

Is it possible to get an ETA for the “official” fix? As this has been “broken” for some weeks now.