Can't make IntelliSense to work with 40K lines-of-code .c file


I'm struggling to get IntelliSense to work with 40K-lines C file.

I've updated some settings:

file ""
commented out the line:

file "clion64.vmoptions"

None of these modifications worked for me.

The code is still unrecognized.

Projects builds fine.
Other smaller files have IntelliSense no problem.

What else could be done to get IntelliSense to work with such a big file?

Comment actions Permalink

Hi Max.

Sorry for the inconvenience!
We have the issue in the tracker:
Please comment or upvote.

Comment actions Permalink

Hi Anna!

Are there any estimates on this bug regarding whether it would be fixed, and when it would be fixed?

Our company is thinking about purchasing CLion licenses but this issue is a blocking point.

Comment actions Permalink


There is the limit for the sorce file size (512K) because of the performance issues.
Unfortunately, we are not planning to change it in the nearest future.
Sorry for the inconvenience!

Comment actions Permalink

Just out of curiosity, whats the motivation for using such huge files? I would have expected it to be uncomfortable to navigate in etc...

Comment actions Permalink

Well it's a project with large history and I don't know exactly why. Due to historical reasons maybe. The reality is we have such files and we can't handle them with CLion.
To split this file for example for 3 parts would be very diffucult and too dangerous because it would cause a lot of bugs.

Comment actions Permalink

@Trond: we too face this issue.  We have some legacy code which are written a decade or 2 ago and gets maintained for so long.  For such code, no one in my company would approve to rearrange the code just to make CLion happy.  I understand that it is not a good practice but while working with legacy code we have no option to deal with it as it is.

Comment actions Permalink

@anotherlionuser: right now it's not a problem. At least for us.

The limitation on file size was removed a long ago.

With the use of specific tweaks, CLion is working great on these large files.

Use the following CLion settings to increase JVM memory.

Open file:


Add the following lines:

# custom CLion VM options



Please sign in to leave a comment.