简体   繁体   中英

Different syntax highlighting between specific tags in VSCode

I'm working with Shopify code a lot at work, and I just started using VS Code to see if it's any good.

And I was hoping there may be an extension that allows different syntax highlighting between specific tags within a *.liquid file.

For example, Shopify has:

{% schema %} JSON syntax highlighting {% endschema %}

{% javascript %} Javascript syntax highlighting {% endjavascript %}

{% stylesheet %} CSS/SCSS syntax highlighting {% endstylesheet %}

Could something like this be possible?

This could be done but no extension currently does it.

The built in HTML extension is a good example of switching between multiple language modes in a single file. It is somewhat complicated, but could definitely be done for liquid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM