Closed komali2 closed 7 years ago
I spent some time during the afternoon looking into what would be required for this and have hit a wall. It seems what needs to happen is simply editing files.associations
like so:
"files.associations": {
"*.hbs": "html"
}
but I can't figure out how to do that from an extension. I tried a couple things, including editing the package.json
to look like:
{
"name": "test-snippets",
"displayName": "TEST Snippets",
"description": "Full HTML tags including HTML5 Snippets",
"version": "0.0.18",
"publisher": "abusaidm",
"icon": "images/icon.png",
"engines": {
"vscode": "^0.10.1"
},
"extensionDependencies": [
"html"
],
"galleryBanner": {
"color": "#1E81C1",
"theme": "light"
},
"categories": [
"Snippets"
],
"contributes": {
"snippets": [
{
"language": "html",
"path": "./snippets/snippets.json"
},
{
"language": "php",
"path": "./snippets/snippets.json"
},
{
"language": "javascript",
"path": "./snippets/snippets.json"
},
{
"language": "javascriptreact",
"path": "./snippets/snippets.json"
}
],
"languages": [{
"id": "html",
"extensions": [ ".hbs" ],
"aliases": [ "HTML", "html" ]
}]
}
}
No good. Someone smarter than me?
Adding the file association is a good enough solution for me! Thanks!
"files.associations": {
"*.hbs": "html"
}
hello,
I am closing this now, as the solution demonstrated resolves this issue.
Thank you all.
It would be awesome if this worked when I was editing .hbs, .ejs, etc files.