For the purposes of syntax highlighting and colouring and intellisense is it possible to treat other extensions (tpl, master, etc) as HTML?
I know it's possible on a file by file basis by pressing CTRL+SHIFT+P and selecting "Change Language Mode" BUT I want it to work off file extension, and not have to redo it every time I open a new file.
I also know it's possible for some languages by editing the json files in the plugins directory, BUT there doesn't seem to be one for HTML.
Go to File > Preferences > Settings. Search "File associations" Click on "Add Item"
Update for VS Code 1.0:
There is a setting files.associations
that can be used to assign file patterns to languages. For example:
"files.associations": { "*.tpl": "html", "*.master": "html" }
Previous answer:
This is a commonly asked feature request and we are looking into this issue for the future.
As a workaround if you need to have a solutio now:
C:\Users\<your name>\AppData\Local\Code\app-<latest-version>\resources\app\server\lib\mime.js
knownTextMimes
'.tpl': 'text/html'
Note: this change will not survive automatic updates but the hopes are that there is a better solution in the future update :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With