Coder Social home page Coder Social logo

Comments (5)

rokoroku avatar rokoroku commented on August 24, 2024 1

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:

스크린샷 2019-03-14 오후 2 23 20
스크린샷 2019-03-14 오후 2 22 33

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"
          }
        }
      ]
    }
  }
}

Result:
스크린샷 2019-03-15 오전 11 58 47

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.

b-ozcan avatar b-ozcan commented on August 24, 2024 1

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.

rokoroku avatar rokoroku commented on August 24, 2024

@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:

from vscode-theme-darcula.

rokoroku avatar rokoroku commented on August 24, 2024

Added in v1.2.1

from vscode-theme-darcula.

mikrit avatar mikrit commented on August 24, 2024

Say please,

How make global variables (example $_POST) color on VSCode -> #9E7BB0?

from vscode-theme-darcula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.