This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
Format .html
files in VS Code?
#162
Unanswered
vincerubinetti
asked this question in
Q&A
Replies: 2 comments
-
🤔 Have you tried the solution here? I feel like changing the file association from HTML to Liquid would solve your problem. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've added the following as workspace settings (in .vscode/settings.json) and it seems to now auto detect as liquid in Jekyll html files and markdown files in VS Code. {
"files.associations": {
"*.html": "liquid",
"*.md": "liquid"
},
"[liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode",
"editor.formatOnSave": true
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've followed the instructions here to use the regular Prettier extension with this plugin, but it seems like it only works on
.liquid
files. I'm writing a Jekyll website template that uses.html
files. Is there any way to configure VS Code settings or the plugin to run on.html
files?FYI, changing the
.html
extension temporarily to.liquid
works correctly and the plugin is able to format the file just fine. I tried the Shopify Liquid extension method, and temporarily set it as the default formatter for html:but trying to format gives an error "Extension 'Shopify Liquid' is configured as formatter but it cannot format 'HTML'-files.".
Beta Was this translation helpful? Give feedback.
All reactions