Comments (5)
Thanks for your comment!
Unfortunately VSCode cannot distinguish php as
operator as you expected currently.
Try Developer: Inspect TM Scope
feature in VSCode and you can see below results:
They both scoped keyword.operator.logical
so I can't apply color scheme only for as
token.
Maybe you can contribute php grammar here?
https://github.com/Microsoft/vscode/blob/master/extensions/php/syntaxes/php.tmLanguage.json
Luckily, you can change the variable
color at least:
Just add below configuration to your VSCode's settings.json
{
"editor.tokenColorCustomizations": {
"[Darcula]": {
"textMateRules": [
{
"scope": ["variable.other.php"],
"settings": {
"foreground": "#9E7BB0"
}
}
]
}
}
}
I'm not familiar with the theme of phpStorm yet, but if more people say it should be this theme's default color scheme then I'll follow them.
from vscode-theme-darcula.
Hi rokoroku,
I wasn't aware of the Developer: Inspect TM Scope
feature within VS Code and the docs aren't very clear about this kind of features as it seems. Thank you for pointing that out for me!
As you've suggested I've added some color customizations to my settings.json using that feature. Now the theme looks even more like my original Darcula theme of PhpStorm v9.
In case if anyone is wondering, this is what I've added:
"editor.fontSize": 12,
"editor.tokenColorCustomizations": {
"[Darcula]": {
"textMateRules": [
{
"scope": ["variable.language"],
"settings": {
"foreground": "#9E7BB0"
}
},
{
"scope": ["variable.other.property"],
"settings": {
"foreground": "#CC8242"
}
},
{
"scope": ["variable.other.php"],
"settings": {
"foreground": "#9E7BB0"
}
},
{
"scope": ["support.variable.property"],
"settings": {
"foreground": "#FFC66D"
}
}
]
}
}
Is there any possibility that we can customize by language too? Something like:
...
{
"scope": ["variable.other.property"],
"language": "javascript"
"settings": {
"foreground": "#9E7BB0"
}
...
from vscode-theme-darcula.
@b-ozcan
Try "scope": ["source.js variable.other.property"]
.
You can find the language scope (source.xx
or text.xxx
) via TM inspector too :)
References:
- https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide
- https://macromates.com/manual/en/scope_selectors
from vscode-theme-darcula.
Added in v1.2.1
from vscode-theme-darcula.
Say please,
How make global variables (example $_POST) color on VSCode -> #9E7BB0?
from vscode-theme-darcula.
Related Issues (20)
- Python: No hightlighting for 'not' and 'in' HOT 3
- Fix `const` variable coloring
- .length() as function call is not properly themed HOT 1
- JS template strings not recognized properly HOT 2
- No margin between gutter and editor. HOT 2
- Background color of 'editorGutter' does not match editor background color HOT 5
- Use theme in IntelliJ HOT 5
- Improve colors HOT 1
- Add LICENSE HOT 4
- support golang syntax
- Components without color on vue 3. HOT 2
- Please include colors for diffs HOT 1
- Add goland's bluish tint color for user defined types HOT 1
- PHP Dollar Sign ($) Color Bug HOT 1
- Support JSON property name HOT 1
- Sass highlighting HOT 5
- UI styling HOT 6
- Highlight active line number HOT 1
- Difference between single/double quotes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-theme-darcula.