-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Format on save not working as expected #225
Comments
Does this mean if you do formatting "by hand" (with the sortcut/command) the code is formatted? Or is it not formatted at all? |
I tried debugging it further. I tried including a I should uninstall VScode and try from scratch if I get time. I'm not familiar with how formatting works, but I'm thinking about the following scenarios:
|
Under the hood, formatting works like the following:
If you try to format but it does not format anything, could you look into Output->Svelte and see if there is anything suspicious (or just copy the log in here)? |
Thanks for clarifying those points. If I get chance I'll try re-installing VScode and trying to reproduce the issue. |
I do have the same error. The code does not get modified on save. Triggered via console |
Does it format if you explicitely invoke the "format" command, or does it not format at all? |
If i force vs-code format ( |
There is a setting You said that inside Output-Svelte, only |
Yes, this setting is true
It seems to me that IDE and console does not work with the same options / settings. Yesterday i added the option to preprocess sass, which works nice, without any problems (via cli
Maybe this is related.. |
I think this is an unrelated issue. You need to install either |
Thanks for the link. I just added the node binary path into The settings |
Possible reason: sveltejs/prettier-plugin-svelte#74 (comment) |
@s0me0ther @limitlessloop could you check if this could be the cause of your problem? sveltejs/prettier-plugin-svelte#74 (comment) |
@dummdidumm , this works great for svelte files now, thank you! |
Did you set the default to all the file type? |
Yes i did. I'm pretty new to VSCode.. "editor.defaultFormatter": "esbenp.prettier-vscode",
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
}, Thank you all for solving this Issue! |
Describe the bug
When a
.svelte
document is formatted on save the indentation does not change.To Reproduce
.svelte
fileExpected behavior
I expect the code to be formatted on save.
Screenshots
An example of code not being formatted below.
System (please complete the following information):
Additional context
I'm using this with
.editorconfig
.The text was updated successfully, but these errors were encountered: