Monokai / monokai-pro-vscode

Issue tracking for Monokai Pro for Visual Studio Code
321 stars 7 forks source link

Regex highlighting issue #244

Closed yeysman closed 2 years ago

yeysman commented 3 years ago

Please see the attached screenshot. image

Could you please fix this issue? It is very confusing when the code contains long expressions with square brackets.

Monokai commented 3 years ago

Unfortunately this is caused by the PHP syntax definitions of VSCode and not by the theme. Monokai Pro uses the syntax definitions of VSCode to color different parts of the RegEx, but it seems the syntax definition of PHP erroneously tags this as a punctuation character. You can see for yourself if you enable "Inspect editor tokens and scopes" from the command palette. Each language has its own syntax definitions. The same RegEx is seems to be correctly colored in Javascript for example.

yeysman commented 3 years ago

Hello Monokai, Thank you for your reply. Please see how default themes colorize this regex expression in PHP below. For example Vscode Dark (default) image Or Github dark (custom theme) image

Is it possible to make it works similar to one of those themes?