Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 553
Abana Clara Avatar asked Aug 29 '19 07:08

Abana Clara


People also ask

How do I enable Emmet in VS?

Creating And Overwriting SnippetsOpen the VS Code settings (Code → Preferences → Settings) and search for “Emmet Extensions Path”. Click “Add Item”, enter the path to the folder where you've saved the snippets. json file you've created earlier and press “OK”.

Why Emmet is not working in VS code?

Click on the Settings or press Ctrl+, to open the VS Code Settings. Step 2: Click on the Extensions tab on the left side of the settings. Click on HTML. Step 3: Click on the “Edit in settings:json” hyperlink to edit the settings in JSON format.


1 Answers

You can add this on your settings.json.

"emmet.syntaxProfiles": {
    "smarty": "html"
},
"emmet.triggerExpansionOnTab": true,
"beautify.language": {
    "html": [
        "smarty"
    ]
}
like image 157
Abana Clara Avatar answered Sep 26 '22 15:09

Abana Clara