dracula / visual-studio-code

🧛🏻‍♂️ Dark theme for Visual Studio Code
https://draculatheme.com/visual-studio-code
MIT License
776 stars 208 forks source link

PHP Syntax Highlight Bug #217

Closed TheDevick closed 2 years ago

TheDevick commented 2 years ago

Steps to Reproduce:

  1. Create This Simple Class:
    
    <?php

namespace Project\Src;

class Test { public function test() { $Int = 0;

    return boolval($Int);
}

}

The **Syntax Highlight** In all `$Int` Will Be **Incorrect**.

The variable Will Be In **White**.

---
## Try to Resolve

In the Configurations Json, add:
```json
    "editor.tokenColorCustomizations": {
        "variables": {
            "foreground": "#bf72e6",
        }
    }

Now, the Variables are in Purple, but The Syntax Highlight In boolval($Int) Will Be Incorrect.

The Dolar Sign ($) Will Be In White

dsifford commented 2 years ago

@TheDevick This is the correct behavior. Variables are supposed to be white.

If you prefer variables to instead be highlighted in #bf72e6, I encourage you to apply that adjustment to your user settings (as you described).

If you are also looking to make the dollar sign that color, try also adding this...

"editor.tokenColorCustomizations": {
    "punctuation.definition.variable.php": {
        "foreground": "#bf72e6",
    }
}