VSCode: How to make Beautify and Emmet run on .tpl files (Smarty)?
Asked Answered
G

2

5

I'm working on an old project on VSCode, and I found out that the html formatter and emmet syntax isn't working for .tpl (Smarty templating engine) files.

It's inconveniencing my workflow, and unfortunately I don't see any extensions in the marketplace for exactly this. I am quite happy to find out how to make extensions (specifically Beautify and Emmet) run on other weird file formats.

Gerard answered 29/8, 2019 at 7:44 Comment(0)
G
8

You can add this on your settings.json.

"emmet.syntaxProfiles": {
    "smarty": "html"
},
"emmet.triggerExpansionOnTab": true,
"beautify.language": {
    "html": [
        "smarty"
    ]
}
Gerard answered 9/9, 2019 at 7:20 Comment(1)
Add to use .tpl instead of "smarty" and then works fineWulf
G
1

In your settings.json, add for emmet :

"emmet.includeLanguages": {
  "smarty": "html"
},
Glamour answered 10/8, 2022 at 9:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.