# File size and length limits

## File size limits in IDE properties

For performance and memory consumption reasons, CLion sets the following file size limits:

* The maximum size for files that CLion is able to open, is controlled by the `idea.max.content.load.filesize` [IDE property](tuning-the-ide.html#common-platform-properties). The default value is `20000` kilobytes.

* The maximum size for files where CLion enables [coding assistance](null) and [design-time code inspection](null), is controlled by the `idea.max.intellisense.filesize` property. The default value is `2500` kilobytes.

Procedure: Change the file size limits in IDE properties

1. Do one of the following:

* Select `Help | Edit Custom Properties` from the main menu.

* On the Welcome screen, click Configure and then select Edit Custom Properties.

* If you cannot start CLion, you can manually create an empty `idea.properties` file in the CLion [configuration directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory).

2. In the custom `idea.properties` file that opens in a new editor tab, specify the desired values in kilobytes, for example:

```
idea.max.intellisense.filesize=3500
```

The properties you add to this file override the corresponding default properties.

## File length limit

By default, the maximum C/C++ source/header file length in CLion is limited to 500 000 characters. If that limit is exceeded, all the code insight features, such as code completion and syntax highlighting are disabled. In this case the IDE notifies you about the current configured limit and the actual file length.

Procedure: Change the file length limit in the Maximum File Length dialog

1. Click the link in the upper right corner of the IDE notification:

![Maximum file length pop-up](https://resources.jetbrains.com/help/img/idea/2026.2/cl_fileTooLong.png)

2. In the dialog that opens, specify the file length limit and click OK to proceed:

![The Maximum File Length dialog](https://resources.jetbrains.com/help/img/idea/2026.2/cl_fileNewLength.png)

> **Note:**
> CLion automatically rebuilds project symbols upon this action.

Procedure: Change the file length limit in the Registry

1. Press   `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `⌘ ⇧ A` (Xcode), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Ctrl+Shift+A` (ReSharper), `⌘ ⇧ A` (ReSharper (macOS)), `Ctrl+Shift+A` (QtCreator), `⌘ ⇧ A` (QtCreator (macOS)), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)) or choose `Help | Find Action` from the main menu. In the popup that opens, start typing `Registry`, select the corresponding item and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

![Searching for Registry in Find Action](https://resources.jetbrains.com/help/img/idea/2026.2/cl_findaction_registry.png)

2. In the dialog that opens, start typing cidr.max.intellisense.file.length. Specify the desired file size limit in the Value field. Click Close to proceed.

![cl_newFileLengthRegistry.png](https://resources.jetbrains.com/help/img/idea/2026.2/cl_newFileLengthRegistry.png)

3. Invalidate project symbols manually by calling `File | Invalidate Caches / Restart`.

