Issue with Code Reformatting in CLion
Dear JetBrains Community,
I hope this message finds you well. I am writing to bring to your attention a persistent issue I have encountered while using CLion, specifically regarding the code reformatting feature.
Despite my attempts to utilize the reformat code function, both through the menu bar and the designated keyboard shortcut, I have been unable to achieve the desired results. I have ensured that the code style settings are properly configured and selected within the application. However, the reformatting does not seem to take effect.
I would appreciate any insights or solutions that the community might offer regarding this matter. Your assistance would be invaluable in resolving this issue.
Thank you for your attention to this matter.
Please sign in to leave a comment.
Hello!
Please open any file where code reformatting doesn't work and check if you see any of the following indicators:
If you see any of them, it means that CLion doesn't recognize this file as belonging to the project. And, in the case of the Nova language engine, some actions, including code formatting, don't work in non-project files due to some historical reasons - https://blog.jetbrains.com/clion/2024/12/2025-1-roadmap/#out-of-project-files.
We've improved this experience in CLion 2025.1 EAP builds by implementing CPP-42973. Feel free to install the latest CLion 2025.1 EAp build from https://www.jetbrains.com/clion/nextversion/ and give it a try.