346

I am trying to work on a large Javascript file in Jetbrains WebStorm 8 and I am getting a message at the top of the editing window that says:

File size exceeds configured limit (2560000). Code insight features not available.

How can I increase the 'configured limit' to get access to all features?

Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
Flash
  • 15,945
  • 13
  • 70
  • 98

11 Answers11

437

In IntelliJ 2016 and newer you can change this setting from the Help menu, Edit Custom Properties (as commented by @eggplantbr).

On older versions, there's no GUI to do it. But you can change it if you edit the IntelliJ IDEA Platform Properties file:

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
Adrián E
  • 1,683
  • 2
  • 14
  • 24
Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • 6
    Remember to put a value like '999999', for Webstorm 11.0.3 removing this field or putting it to an extremely high value (about twelve 9s) didn't work. – Molten Ice Jan 21 '16 at 11:06
  • 1
    Code insight features include "inspections" and code formatting. I know both those features didn't work on an 8MB XML file I opened until I increased the file size limit. – Andy Dec 05 '16 at 10:53
  • 1
    When i do this in android studio it says 'The file C/users/....androidstudio3.0/...../ideas.customproperties does not exist. Create?' Not sure I want to risk screwing something up. Figured out exceeding this limit was why my autocomplete and other features stopped after just noticing this message. – Androidcoder Dec 10 '17 at 17:12
  • We can use the same method for JetBrain's IntelliJ IDE derivitives. I've verified in RubyMine 2018.2.1. Like @Andy, I had a situation where I'm reviewing some large, unformatted XML files. Reformatting a 3.5MB files is quite slow, but it works now, and that's what I wanted. – webaholik Aug 28 '18 at 13:17
  • Use that in Android projects when the R resource class isn't recognized, as in [this question](https://stackoverflow.com/q/17054000/1621107); because the generated source file exceeds the limit. – fabianopinto Jan 02 '19 at 19:57
  • still working on android studio 4.2, it asks me to create a new file then I put the size, I had to restart the IDE then it was ok, thank you ;) – Nabil Ait Brahim Jul 13 '21 at 11:16
160

This is built from Álvaro González's answer and How to increase IDE memory limit in IntelliJ IDEA on Mac?

Go to Help > Edit Custom Properties

Add:

idea.max.intellisense.filesize=999999

Restart the IDE.

Community
  • 1
  • 1
Henry
  • 2,870
  • 1
  • 25
  • 17
  • 1
    For Android Studio on Windows, it asked me to create new file `C:\Users\\.AndroidStudio2.3\idea.properties`. But finally it worked. Many thanks ! – Atul Oct 12 '17 at 11:30
  • 22
    If you are wondering, the value is in KB and default is 2500. https://www.jetbrains.com/help/idea/tuning-the-ide.html – Mahdi May 22 '18 at 10:03
49

Edit config file for IDEA: IDEA_HOME/bin/idea.properties

# Maximum file size (kilobytes) IDE should provide code assistance for.
idea.max.intellisense.filesize=60000

# Maximum file size (kilobytes) IDE is able to open.
idea.max.content.load.filesize=60000

Save and restart IDEA

sendon1982
  • 9,982
  • 61
  • 44
  • also the default max.content setting is a factor of 10 bigger than the other you have the same – jenson-button-event Jul 24 '19 at 09:12
  • this answer will work (and, contrary to other answers, it correctly suggests that two properties should be modified). But recommended way is to drop these values in "Edit Custom Properties", as other answers suggest – Alleo Jun 14 '22 at 04:44
39

Go to IDE:

  • STEP 1: Open the menu item: click on Help then click on Edit Custom Properties
  • STEP 2: Set the parameter:idea.max.intellisense.filesize= 999999999
  • STEP 3: restart IDE
E A
  • 995
  • 1
  • 10
  • 24
17

PhpStorm 2020

  1. Help -> Edit Custom Properties.
  2. File will open in Editor. Paste the section below to the file.
 #---------------------------------------------------------------------
 # Maximum file size (kilobytes) IDE should provide code assistance for.
 # The larger file is the slower its editor works and higher overall system memory 
 requirements are
 # if code assistance is enabled. Remove this property or set to very large number 
 if you need
 # code assistance for any files available regardless their size.
 #---------------------------------------------------------------------
 idea.max.intellisense.filesize=2500
  1. File -> Invalidate / Restart -> Restart

This might not update sometimes and you might need to edit the root idea.properties file.

To edit this file for any version of Idea

  1. Go to application location i.e linux => /opt/PhpStorm[version]/bin
  2. Find file called idea.properties Make backup of file i.e idea.properties.old
  3. Open original with any txt editor.
  4. Find idea.max.intellisense.filesize=
  5. Replace with idea.max.intellisense.filesize=your_required_size i.e idea.max.intellisense.filesize=10480 NB by default this size is in kb
  6. Save and restart the IDE.
Breimer
  • 506
  • 8
  • 14
6

Instructions for changing this settings in latest Jetbrains products

Editing product64.vmoptions didnt worked for me, but editing idea.properties worked ok. Also in order to be able to work with large files you may need to change values for in product64.vmoptions / product.vmoptions for -Xms and -Xmx

Andrew Zhilin
  • 1,654
  • 16
  • 11
6

For the 64-bit 2020 version

I tried in vain to find the current location of this file for version 2020. When navigating to Help > Edit Custom Properties a new (empty) file is created at appData/Roaming/JetBrains/IntelliJIdea2020.1/idea.properties. There is no /bin directory as some tutorials suggest. However, neither adding the block from the accepted answer to this file nor adding the same file to /bin resulted in an update to my configuration.

I finally discovered that a reference to the same property exists in appData/Roaming/JetBrains/IntelliJIdea2020.1/idea64.exe.vmoptions. It looks like this:

-Didea.max.intellisense.filesize=3470

I changed it to this, which should be adequate for my needs:

-Didea.max.intellisense.filesize=9999

This strikes me as a bug in this version where the behavior of the menu item doesn't reflect what's needed, but it may also be the case that my particular setup is somehow different than stock. I do have PyCharm and the JDK installed.

isherwood
  • 58,414
  • 16
  • 114
  • 157
  • doesn't this bug causes your problem? https://youtrack.jetbrains.com/issue/IDEA-190316 – Line Dec 23 '20 at 13:56
5

To clarify Alvaro's answer, you need to add the -D option to the list of command lines. I'm using PyCharm, but the concept is the same:

pycharm{64,.exe,64.exe}.vmoptions:
<code>
    -server
    -Xms128m
    ...
    -Didea.max.intellisense.filesize=999999 # <--- new line
</code>
Ghasem
  • 14,455
  • 21
  • 138
  • 171
squeegee
  • 762
  • 8
  • 10
  • 4
    You don't have to add the '-D' and you need to use the idea.properties file not the vmoptions file. – spirit walker Jul 17 '14 at 04:27
  • 1
    I am using the 64-bit executable and adding it to idea.properties didn't apply the change. Adding the newline as described above fixed this for me. Should there be a comparable idea64.properties file? – Noremac Mar 18 '15 at 20:43
  • @Noremac - There's a `PhpStorm.bat` file in that same `bin` directory that suggests there's a `-Didea.properties.file=...` JVM option :-? – Álvaro González May 13 '15 at 08:33
5

For those who don't know where to find the file they're talking about. On my machine (OSX) it is in:

  • PyCharm CE: /Applications/PyCharm CE.app/Contents/bin/idea.properties
  • WebStorm: /Applications/WebStorm.app/Contents/bin/idea.properties
jfunk
  • 7,176
  • 4
  • 37
  • 38
  • I'm also an OSX user and the accepted answer worked for me. Performed in RubyMine, but they all should be the same. – webaholik Aug 28 '18 at 21:21
3

Changing the above options form Help menu didn't work for me. You have edit idea.properties file and change to some large no.

MAC: /Applications/<Android studio>.app/Contents/bin[Open App contents] 

Idea.max.intellisense.filesize=999999 

WINDOWS: IDE_HOME\bin\idea.properties
Faheem
  • 930
  • 10
  • 7
3

Windows default install location for Webstorm:

C:\Program Files\JetBrains\WebStorm 2019.1.3\bin\idea.properties

I went x4 default for intellisense and x5 for file size

(my business workstation is a beast though: 8th gen i7, 32Gb RAM, NVMe PCIE3.0x4 SDD, gloat, etc, gloat, etc)

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#--------------------------------------------------------------------- 
idea.max.intellisense.filesize=10000

    #---------------------------------------------------------------------
    # Maximum file size (kilobytes) IDE is able to open.
    #--------------------------------------------------------------------- 

idea.max.content.load.filesize=100000
jenson-button-event
  • 18,101
  • 11
  • 89
  • 155