daaain / Handlebars

Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.
MIT License
301 stars 48 forks source link

Not working in vscode #97

Closed kuncevic closed 7 years ago

kuncevic commented 7 years ago

Just installed the extension and cant see it is working. I've got file like myfile.hbs and no even syntax highlighting:

I am on windows 10 using vscode 1.12.1

Update Just realized that some of my hbs files has just json in it

image

So do not have any syntax highlighting in these. Files where I have the real hbr template seams to be good

Is there anyway to get json highlighting as well?

daaain commented 7 years ago

Just out of curiosity, if the file only has JSON content then why do you use .hbs file extension?

I think JSON content should work inside a HTML / Handlebars file as there you would put it inside <script> and that would be treated as Javascript.

kuncevic commented 7 years ago

Yeah i agree that json content is should not have .hbs extension but currently it is just sort of placeholder. Eventually I will be converting that in to .hbs template. So was just thinking if it is make scene to support json highlighting but probably not much sense.

daaain commented 7 years ago

Yeah, I wouldn't add code to support JSON, but as I said earlier, you could enclose your JSON in a <script> tag as you work with it and then it would be treated as Javascript and get highlighting.