gerane / VSCodeThemes

Themes for Visual Studio Code
199 stars 75 forks source link

How to change the PHP constant to Italic mode? #32

Open codesign5 opened 7 years ago

codesign5 commented 7 years ago

I am using abyss theme and I would like to change the PHP constant to Italic, How can I edit it?

gerane commented 7 years ago

I am not familiar with PHP, but there is a new feature in VSCode called Developer: Inspect TM Scopes that you can access from the Command Palette. When you click on something in the editor it will show you which aspect of the tmtheme is coloring the selection. This might vary from theme to theme or language to language.

Here is an example of what the Scope Explorer looks like.

capture2

So if you want it to only apply to PHP, you would probably need to add a new scope to the theme targeting one of the constant scopes in the php.tmlanguage.json that comes bundled with code. The scope would likely be one of these depending on what you are targeting.

The PHP language is in the install folder at \resources\app\extensions\php\syntaxes\php.tmLanguage.json

The json will show you the regex patterns that each scope matches, so you should be able to narrow down which of them would work for your needs.