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.
请先登录再写评论。
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.
I'm using latest CLion version on Linux
```
CLion 2025.1.2
Build #CL-251.26094.123, built on June 3, 2025
Source revision: f0f8b9f8a6ab5
Licensed to Andrea Palmatè
Subscription is active until January 2, 2026.
Runtime version: 21.0.7+9-b895.130 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.14.0-15-generic
Ubuntu 25.04; glibc: 2.41
.NET Core v8.0.11 x64 (Server GC)
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 12
Registry:
actionSystem.update.actions.warn.dataRules.on.edt=false
debugger.attach.dialog.enabled=true
run.processes.with.pty=TRUE
ide.experimental.ui=true
ide.slow.operations.assertion=false
cache.folding.model.on.disk=false
llm.show.ai.promotion.window.on.start=false
Non-Bundled Plugins:
com.jetbrains.TabFormat (0.6)
Current Desktop: ubuntu:GNOME
```
And I have the same problem. It is really quite annoying i can't reformat the code as I like. I had no such problem on Windows with same project. This only occurs on Linux
The project is not a cmake project. It has a GNUMakefile and I compile it manually in the terminal
Hi Andrea!
CLion supports Makefile projects - https://www.jetbrains.com/help/clion/makefiles-support.html.
Is your project correctly loaded in CLion? Do you see any errors/warnings in the Build tool window if you do Tools | Makefile | Clean and Reload Makefile Project?