Search code examples
visual-studio-codesmartyemmetjs-beautify

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


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.


Solution

  • You can add this on your settings.json.

    "emmet.syntaxProfiles": {
        "smarty": "html"
    },
    "emmet.triggerExpansionOnTab": true,
    "beautify.language": {
        "html": [
            "smarty"
        ]
    }