Open charlespwd opened 2 weeks ago
Hello! I managed to make the formatting of the {% schema %} tag for the vscode browser extension works.
(see video > 0:06)
https://github.com/user-attachments/assets/c71b210a-f3fd-4c05-9708-888b1af018cd
It worked after I added thebabelPrettierPlugin from the prettier 'parser-babel' plugin.
import LiquidPrettierPlugin from '@shopify/prettier-plugin-liquid';
import babelPrettierPlugin from 'prettier/parser-babel';
export const vscodePrettierFormat: Format = async (textDocument) => {
/* ... */
return prettier.format(text, {
parser: 'liquid-html',
plugins: [
LiquidPrettierPlugin as any,
babelPrettierPlugin as any,
],
});
};
Describe the bug I think we're missing plugins because the
{% schema %}
tag wasn't getting reformatted in my demo of the extension running on https://github.dev. I think it has to do with theprettier/standalone
import. I feel like we need to add the json/css/js plugins manually for it to work.Breadcrumbs