Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
287 views
in Technique[技术] by (71.8m points)

visual studio code - HTML syntax not highlighting correctly

The syntax highlighting for .html files does not work. This is what happens when I open an .html file

However, highlighting for .css files does work. Any ideas what should I do?

This is what .css files look like

If anyone might find it important (though none of them affect HTML other than the indentation colors one, and I use the default Microsoft VSCode HTML syntax highlighting), this is the list of my extensions:

enter image description here

question from:https://stackoverflow.com/questions/65871739/html-syntax-not-highlighting-correctly

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved the issue. I realised that once when I was meddling with something I added by accident a single character to the beginning of the file Microsoft VS CodeResourcesAppExtensionshtmlsyntaxeshtml.tmLanguage.json which made VSCode unable to parse it. The highlighting works now.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...