Try Visual Studio Code. Need to use an existing compiler - probably g++ or clang++. One can install it as a flatpak.
There are many others, one can search for them on the web.
Try to avoid Code Blocks IMO, it doesn't seem to have background compilation (need this for intellisense type operation), nor does it have any version control such as git. These are show stoppers for me.
Does eclipse still take like 5 min just to open hello world?
Ive tried it off and on since it came out, last time was maybe 3 years back, and I could literally take a bio break and come back before it opened. Once it was open, it worked OK I suppose. It seemed sluggish across the board and I would probably pull my hair out if it took on a multi million line compile. This was right around a total eclipse near where I live, and I came to realize where they got the name ... both involved a lot of waiting around for something to happen :P
That aside, I thought you could run normal visual on linux. Not having done it, maybe I misunderstood? Code is a bit thin for my tastes, it does a good job for a trimmed down package but its missing a lot too. After trying to use it for a while I backburnered it as a way to interface to GIT.
I’ve used Eclipse for a full IDE on Linux, but you mentioned using nano. If your looking for an interactive editor I would suggest VSCode an mentioned earlier or Atom.io. I’ve been using atom for a couple years for quick editing. It’s very similar to VSCode. There’s a bunch of packages available free and has formatting based on languages built in. It has a small footprint and is reliable.
I use EMACS and I have for 40 years. It was made by programmers for programmers. It will automatically format and is infinitely customizable. It originally started out as a smart text editor but expanded. It is fast and gives you total control of your environment. There is a learning curve but well worth it IMO.