Question
When opening a large code file in the JetBrains IDE, it complains at the top of the editor:
The file size exceeds the configured limit (2.56 MB). Code insight features are not available.
How to fix it?
Answer
For performance and memory consumption reasons, JetBrains IDEs set the following file size limits:
- The maximum size for files that JetBrains IDEs can open, is controlled by the
idea.max.content.load.filesizeIDE property. The default value is20000kilobytes (20MB). - The maximum size for files where JetBrains IDEs enable coding assistance, is controlled by the
idea.max.intellisense.filesizeproperty. The default value is2500kilobytes. - The maximum size for large files that JetBrains IDEs can open, is controlled by the
idea.max.content.load.large.preview.sizeIDE property. The default value is2500kilobytes.
Change the file size limits in IDE properties
-
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 JetBrains IDEs, you can manually create an empty idea.properties file in the JetBrains IDEs configuration directory.
-
In the custom idea.properties file that opens in a new editor tab, specify the desired values in kilobytes, for example:
# Maximum file size (kilobytes) IDE should provide code assistance for. idea.max.intellisense.filesize=60000 # Maximum file size (kilobytes) IDE can open. idea.max.content.load.filesize=60000 # Maximum large file size (kilobytes) IDE can open. idea.max.content.load.large.preview.size=80000The properties you add to this file override the corresponding default properties.
-
Restart the IDE.
These settings are also applied to JetBrains Gateway.
Ref:
https://www.jetbrains.com/help/rider/Configuring_File_Size_Limit.html
Comments
0 comments
Please sign in to leave a comment.