Goland: Every few seconds the code expands
Answered
Hello everyone
On MacOS and Goland, my GO code auto expands every few seconds.
It is so annoying, it interrupts my focus and sometimes I work accidentally in another function due to the suddenly expanded code.
This issue is recognised as a bug. The ticket were closed and I were relayed to another (older ticket) that has only a “normal” priority. Sad part to me is, that the ticket is more than 5 months old.
However, this issue is in my opinion so intense, that I can not use the IDE (that I paid for).
It doesn't matter if I the latest stable version or the current EAP. How is it possible, that this problem has not a high prio?
Has anyone else worked with fully collapsed code … it's pita..
Please sign in to leave a comment.
Hi Stephan,
Sorry for the inconvenience.
Could you please try to disable Reformat Code and Optimize Imports in Settings | Tools | Actions on Save?
Hello Daniil
This did the trick. No freaky auto expand, such a relief.
Daniil, how would I go about making a formatter exception to disable auto-expansion on inline if statements. I don't mind the automatic refactoring on save, but there are certain concise (albeit tedious) pieces of code that benefit from inline if statements. Is there a way to modify the formatting scope to not auto-expand an if statement if inline specifically?
Ztomlinson7 Hi there. Could you please send us a video of what you observe on your end? I've tried to test this in the most recent version of our IDE (GoLand 2024.2), and for me, running Go Fmt doesn't expand the collapsed pieces of code. Or do you mean that an inline if statement is being converted into a multi-line one? Having an example of the behavior would help to understand if the behavior is expected and how to best change it, if possible.
Thank you!