There are some weird auto indentation going on in CLion that I don't understand why. Here is an example
int i1(5); // some comments, then I hit Enter
// auto indentation goes here. I hit Enter again
// It goes here
float f = 5; // some comments, then I hit Enter
// then auto indentation goes here. I hit Enter again
// It then goes here.
float f2 = 6;
// If I don't comment on the previous line, there is no weird indentation
It seems like whenever I use = to initialize an variable, and then add comment at the end of the line, it will give me extra indentation on the next line. But in all other instance, it will not give me extra indentation.
I recently installed CLion and it was using default code style. It seems like the the extra indentation is controlled by the continuation indent setting, but I only want this continuation indent setting be application to codes, not comments. Where can I change me setting to disable the continuation indentation for comment when using = for assignment?
This bug has been fixed in CLion 2018.2 EAP (https://www.jetbrains.com/clion/nextversion/ ).
I personally uninstalled CLion 2018.1 because of this bug, since the EAP was stable enough.