Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.37 KB

File metadata and controls

40 lines (25 loc) · 1.37 KB

prettier-plugin-liquid

Prettier plugin to make Prettier parse Liquid files as HTML.

This plugin doesn't provide any special formatting for the Liquid markup language!

Why this plugin?

I want Prettier to format Liquid templates onSave in VSCode. I tried changing VSCodes's language identifier for .liquid files:

"files.associations": {
  "*.liquid": "html"
}

This works in the way that Prettier will process those files, but highlighting and auto-completion for Liquid specific syntax breaks.

Instead of telling VSCode to treat .liquid files as HTML, the plugin registers Prettier's default HTML parser for the liquid language.

Installation

npm install -D https://github.com/nicolaibach/prettier-plugin-liquid.git

Usage

Plugins are automatically loaded if you have them installed in the same node_modules directory where prettier is located.

–– https://prettier.io/docs/en/plugins.html#using-plugins

Resources

License

This project is MIT licensed.