Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Format liquid(Shopify) code in visual studio code

How to format .liquid (Shopify liquid) code in Visual Studio. By settings language as HTML I can do it but at the same time, I can't use Shopify autocomplete. When I switch to liquid.html then I can use the autocomplete but I can't format code. Is there any way I can use another language and format code as another language in visual studio?

like image 383
Picks Prabhakar Avatar asked May 17 '18 06:05

Picks Prabhakar


People also ask

What is the Shopify liquid Visual Studio Code Extension?

The Shopify Liquid Visual Studio Code extension has the following features: Applies Liquid {% comment %} and {% endcomment %} tags to line and block comments using keyboard shortcuts

Can I add theme check to my Shopify store?

You can add Theme Check as a part of the Shopify Liquid Visual Studio Code extension. The Shopify Liquid Visual Studio Code extension has the following features: Applies Liquid {% comment %} and {% endcomment %} tags to line and block comments using keyboard shortcuts

What is the liquid code extension?

A visual studio code extension for the Liquid template language. Includes syntax highlighting support for Liquid code used in HTML, JavaScript CSS, SCSS, Markdown and more. Ships with auto formatting code beautification, advanced snippet auto-completion resolution and respects VS Codes native Intellisense, hover and diagnostic features.

How do I enforce my code formatting style in liquid?

After installing this extension run the Liquid: Generate .liquidrc File command to create a .liquirc rule file in your projects root directory. This file will be used to enforce your code formatting style, refer to the Formatting and Rules section for additional information for customization options.


1 Answers

The VSCode Liquid extension provides formatting and syntax highlighting. Also has intellisense and ton of other features.

like image 126
User_coder Avatar answered Sep 27 '22 23:09

User_coder