DEV Community

Discussion on: My favorite extensions for Visual Studio Code

Collapse
 
dgloriaweb profile image
dgloriaweb

Hi, I need to use {translate text=""} smarty function, and it's really hard to see any text after I've added this to the code. Do you know how can I add a color theme especially for this smarty tag, so that I can distinguish? Thanks!!!

Collapse
 
dgloriaweb profile image
dgloriaweb

Hi, I've sorted this out. I've searched for smarty in the settings, opened settings.json and fiddled with the scopes and values a bit. Here's the result.
Actually the scope can be found by searching (shift+ctrl+p) for "Developer: Inspect Editor Tokens and Scopes" by hovering over some elements.


  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "string.quoted.double.smarty",
        "settings": {
          "foreground": "#ff0808",
          "fontStyle": "italic"
        }
      },
      {
        "scope": "entity.name.function.smarty",
        "settings": {
          "foreground": "#fffd77",
          "fontStyle": "italic"
        }
      },
      {
        "scope": "variable.parameter.smarty",
        "settings": {
          "foreground": "#fffd77",
          "fontStyle": "italic"
        }
      },
      {
        "scope": "keyword.control.smarty",
        "settings": {
          "foreground": "#48ff38",
          "fontStyle": "italic"
        }},
      {
        "scope": "string.quoted.double.html",
        "settings": {
          "foreground": "#de38ff"

        }
      }
    ]
  },
Enter fullscreen mode Exit fullscreen mode