-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate liquid.format.enable in favor of editor.formatOnSave and editor.defaultFormatter #132
Comments
I can't recreate. Can you confirm no global workspace settings are defined? |
What about simply toggling? Screen.Recording.2022-12-13.at.09.59.32.mov |
No workspace specific settings if that's what you mean? I've tried toggling the option as per your video but it didn't work. It created the settings file in my workspace as expected but it didn't have any impact otherwise. I'll share a video afterwards to show you, I'm about to head into a meeting now though |
Please do. Thanks. |
So I've been struggling to replicate this consistently since coming back to it. I've been trying to record a barebones example and had mixed results. Hopefully this should demonstrate the issue I've been having though. The fact I've not been able to replicate it consistently is just more concerning vscode-liquid-issue.mov |
Interesting. I am guessing there is a conflict happening or maybe it is the behaviour of setting configuration within user workspace settings and then in the projects Can you check your user workspace settings and see if you can locate any language options, specifically, one which is setting the liquid default formatter, eg: {
"[liquid]": {
"editor.defaultFormatter": "sissel.shopify-liquid"
}
} In any sense, this logic needs some re-thinking. As always, curious your thoughts here. The |
I think I've figured this out because of a yml file... Recently I'd enabled |
I think you might be onto something here though as @MaxDesignFR recently reported a similar issue in the discord. I'll have a deeper look to see if is on the extension end or something else. |
I also have |
@MaxDesignFR thanks for chiming in 🙏🏼 @davidwarrington What are your thoughts here? should |
I think it would make sense to deprecate it in favour of {
"[liquid]": {
"editor.defaultFormatter": "sissel.vscode-liquid"
}
} Reason being is that's how prettier and probably other formatter for VSCode are set up. Also since Shopify how now released the 1.0.0 of their prettier plugin, having your extension fighting with it might hurt adoption. I know for example my team are most likely to stick with the official Prettier plugin because its Shopify backed, and we have some team member who use other editors too |
Good point. The Prettier Plugin solution will always be favoured and moving developers to more complex solution with more refined control is going to be an uphill battle (no doubt). I guess this starts with adopting existing and known handlings which pertain to text editor automated beautification. It's interesting how the opinionated conventions have been so readily welcomed, especially when dealing with a template language like Liquid. The Prettier plugin is still lacking when dealing with structures (eg: I'll deprecate this option in next minor v3.3.0 and instead move to options defined with |
Closing as most folks should've adopted this by now. Thanks again brother. |
When trying to disable liquid formatting with this code VSCode reports that it doesn't recognise the setting:
The text was updated successfully, but these errors were encountered: