This plugin for Prettier maps a bunch of more or less exotic file types to languages already supported by Prettier.
Recently i had to work with several file types not supported by Prettier and really missed the handy format on save feature in VSCode.
I tried changing VSCodes's language identifier like in this example for Liquid templates:
"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.
To get around this issue, this plugin maps Prettier's existing parsers to new file extensions.
npm install -D https://github.com/nicolaibach/prettier-plugin-flavours.gitPlugins are automatically loaded if you have them installed in the same
node_modulesdirectory whereprettieris located.
| Language | File Extension | Prettier Parser |
|---|---|---|
| Liquid | .liquid | HTML |
| JavaScript for Automation (JXA) | .jxa | Babel |
This project is MIT licensed.