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
Breaking up HTML tags in JSX upon save #452
Comments
I have the same issue after update VScode today. |
I'm having a similar problem but sometimes it seems to format the document correctly. If I Format Document repeatedly, it seems to alternate between correctly and incorrectly formatted, as if it's sometimes using prettier + its config from my repo, and sometimes using a different formatter or prettier with the wrong configuration. Adding |
I narrowed this down to the clang-format extension. Adding this to my settings fixes the problem:
|
I was experiencing the same problem, even though I didn't have the clang-format extension installed. Installed it, and added the false setting suggested by @jtbandes above, and all is now well. Seems a bit mad though. |
I'm not sure but I just updated to 1.23.1 and I think the issue has gone away. |
Having had the same issue yesterday, it does appears to work better with 1.23.1. One issue remains though;
is transformed into:
Where before it would keep the oneliner. Enabling/disabling prettier and reloading the editor fixed it for me (not sure if it lasts yet though [edit]no, it is back again[/edit]) |
Updating to 1.23.1 did not work for me. |
Yeah, I think I spoke too soon — still having issues in some cases, but with clang-format installed and I kinda suspect this is a VSCode issue (not this extension's fault) since it seems like it involves multiple extensions interacting with each other. I would encourage someone to file an issue at https://github.com/Microsoft/vscode/issues if you can come up with exact steps to reproduce the problem, and link back here for context. (I'm not at the right computer to do this at the moment.) I suppose it might also be related to microsoft/vscode#49708 |
Oh, thank the heavens, the linked issue at jsbeautify solved it for me. Disabled the Beautify plugin on my vscode and all is well. |
@jtbandes Thank you so much 👍
and it fixed =)) |
After ignore beautify everything went ok. |
mandem works like a charm 👍 |
thanks man |
thank you man............ @lipis |
@kajangid you are welcome, but what have I done to deserve the "thank you"? |
I've suddenly encountered this weird problem, and the thing is that I did nothing with configs and extensions between the last time that it was okay and now, could it be a vscode bug? any suggestions |
me too |
Thanks you I had the same problem. I disabled Beautify extension and all works flawlessly |
beautify seems to be the culprit disabled it =>reloaded and everything works flawlessly. |
JUst uninstall beautify extension still not work on mine |
reload vs code and remove other beautifying extensions |
I uninstall beautifying and it works! |
"files.associations": { |
it worked thanks get back to coding |
Put the following code in settings.json and as well as in .prettierrc files. |
What if you don't have beautify installed? |
Thanks man,,its just worked for me after uninstalling Beautify and reloaded again |
Hey guys, I've been using prettier for about 6 months now and never had an issue. but I recently updated VSCode and I ran into this problem today with it breaking out my HTML tags in my JSX and spacing it all wildly.
Example follows:
Before save:
After save
I can provide additional info if needed. Such as my settings, etc.
UPDATE 6/4/18: Resolved by disabling Beautify, which was causing issues with Prettier.
The text was updated successfully, but these errors were encountered: