DEV Community

dgloriaweb
dgloriaweb

Posted on

Smarty (php template engine) environment setup in vs code

Hi Guys!

I am working in a php app that uses https://www.smarty.net/. I am just beginning to learn, and I'd like to have the best possible setup for my vs code.
However I have issues.
I am using prettier and php intelephense at the moment.
I've got this added in my settings.json:

 "files.associations": {
    "*.tpl": "html"
  },
Enter fullscreen mode Exit fullscreen mode

that should help with autoformatting using shift+alt+f. However it doesn't.

I have had a hard time finding the php methods in the code, so I added this to my AppData/Roaming/Code/Settings.json file to change the color:

"editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "entity.name.function",
        "settings": {
          "foreground": "#06ffc1",
          "fontStyle": "italic"
        }
      }
    ]
  }
Enter fullscreen mode Exit fullscreen mode

Discussion (0)