scalafmt overly / eagerly formatting
Answered
I'm using Scala 3.1.2, sbt 1.6.2 and scalafmt 3.5.8 and IntelliJ 2022.2 EAP. THE ISSUE: Using .scalafmt since some days (don't recall the exacat update) it has started to overly format and remove white spaces on the fly as I type regardless if typed content is in comments or in actual code. Also it has basically disabled code completion by Tab. I did try to use // format:off, but only workaround was to disable scalafmt and use only IntelliJ IDE. Since scalafmt saves a ton of time as I'm used to it, I was wandering if there is any awareness of this behavior?
Please sign in to leave a comment.
Could you provide a code sample where this can be reproduced?
What formatter is selected in the Preferences| Editor | Code Style | Scala dialog,
IntelliJ
orScalafmt
?I have Scalafmt selected as formatter, which worked fine till maybe a week ago or so. This is a nightmare and if I try to use ScalaDocs type of comments, it is not possible if scalafmt is on, because it does not allow adding lines (mening that if I press Enter for a new line it removes the line immediately after I pressed the Enter). This is a burden even with smallest pieces of code, such as:
In addition IDE is now just raining errors and occasionally gets totally stuck. Getting close to a point to get rid of whole EAP mess...
Rolled back to 2022.1.2 and life is good :)
Thanks for the info.
Would it be possible for you to also provide the idea.log file of the 2022.2 EAP version? The log directory can be found here. You can upload it securely to https://uploads.jetbrains.com/ and provide the upload id.
Hi, Sent as instructed. Did you get it?
Please provide the upload id, then I will be able to identify it among other uploads.
Upload ID: 2022_06_09_xHFkNCu1eFgfArJ14ZEZit (files: .pid and 19 more)
Thanks, but this looks like the contents of the %LOCALAPPDATA%\JetBrains\IntelliJIdea2022.2 directory. If you could go one level deeper from there, into the ...\log directory, and find the file called idea.log there, that would be the file that I need.
Upload ID: 2022_06_09_Dtf6rwUjreoSgmaZMJ43af (file: idea.log)
Thank you!
I created a corresponding bug report in our system for it: https://youtrack.jetbrains.com/issue/SCL-20302
Responsible developers will look into it shortly.
Feel free to follow the ticket to get updates on the progress of the investigation.
Sure, thanks!
Arina Efremova thanks for your reaction, got a positive message confirming the fix will be in a future EAP.