-
Notifications
You must be signed in to change notification settings - Fork 24
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
Formatting .liquid
files deletes their contents
#358
Comments
hi @joshistoast , thanks for reporting this issue 🙏 to confirm, is this happening for all liquid files or just certain ones?? because this doesn't appear to be broken for everyone, this is our current suspicion: if it’s happening on all liquid files
if it’s happening only in some liquid files
lastly if you could share your extension logs, that would also give us more insight about the issue. here's how you can do it in vs code: thanks in advance for your help as we investigate |
@mgmanzella "[liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode",
"editor.formatOnSave": true
}, Screen.Recording.2024-05-16.at.12.26.46.PM.movThe issue is immediately resolved when setting |
appreciate you sharing that but could you please answer the questions in my previous comment, we need this information to understand what's happening. thanks 🙏 |
Apologies, it happens in every liquid file |
ty! this is likely an issue related to your environment. can you also share the vs code extension logs from your editor for language server an additional workaround you can try is deactivating other extensions and see if the issue still persists, keep us posted tho 🙏 |
@mgmanzella language server logs should be in the video on the bottom half of the window.
Did this also but to no avail, but uninstalling the shopify extension in question did solve it. |
ahhh you're right my bad, do you mind sending the raw logs from language server?? if you dont feel comfortable doing that publicly, feel free to DM me on the partners slack
right which removes liquid prettier from vs code 😭 we'll investigate thanks again for raising 🙏 |
Update, editor update on save set to false and my file is still being wiped. |
Raw logs:
|
More context: #586 (comment) Maybe it's WSL related? How is this happening? We're supposed to not do anything when there's an error. Why would |
@charlespwd Thanks for moving this here! Happy to give more context if necessary. |
Describe the bug
When both the extension itself and
formatOnSave
is enabled on liquid files, the entire file is wiped on save.An issue for this existed but was prematurely closed: #327
Source
Any
.liquid
fileExpected behavior
Formatting the file
Actual behavior
Deletes all contents of the file
Debugging information
Additional context
Setting
formatOnSave
tofalse
prevents further deletions of file contents, but doesn't format any files.The text was updated successfully, but these errors were encountered: