我试图在Jetbrains WebStorm 8中处理一个大型Javascript文件,我在编辑窗口顶部收到一条消息,说:

文件大小超过配置限制(2560000)。代码洞察特性不可用。

如何增加“配置限制”以访问所有功能?


在IntelliJ 2016及更新版本中,您可以从帮助菜单中更改此设置,编辑自定义属性(由@eggplantbr评论)。

在较旧的版本中,没有GUI可以做到这一点。但是你可以修改它,如果你编辑IntelliJ IDEA平台属性文件:

#---------------------------------------------------------------------
# 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

为了澄清Alvaro的回答,您需要将-D选项添加到命令行列表中。我使用的是PyCharm,但概念是一样的:

pycharm{64,.exe,64.exe}.vmoptions:
<code>
    -server
    -Xms128m
    ...
    -Didea.max.intellisense.filesize=999999 # <--- new line
</code>

对于那些不知道在哪里找到他们正在谈论的文件的人。在我的机器(OSX)上,它在:

PyCharm CE: /Applications/PyCharm CE.app/Contents/bin/idea.properties WebStorm: / / WebStorm.app /内容/ bin / idea.properties应用

在最新Jetbrains产品中更改此设置的说明

编辑product64。Vmoptions没有为我工作,但编辑的想法。属性工作正常。 另外,为了能够处理大文件,您可能需要更改product64中的值。Vmoptions / product。vmoptions用于-Xms和 - xmx

这是建立在Álvaro González的答案和如何增加IDE内存限制IntelliJ IDEA在Mac上?

进入帮助>编辑自定义属性

Add:

idea.max.intellisense.filesize=999999

重新启动IDE。

编辑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

保存并重新启动IDEA

从帮助菜单中更改上述选项对我不起作用。 你有编辑的想法。属性文件,并更改为一些大的没有。

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

Idea.max.intellisense.filesize=999999 

WINDOWS: IDE_HOME\bin\idea.properties

Webstorm的Windows默认安装位置:

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

智能感知默认设置为x4,文件大小默认设置为x5

(我的商业工作站是一个野兽:第8代i7, 32Gb RAM, NVMe pcie3.0 0x4 SDD, gloat,等等,gloat,等等)

#---------------------------------------------------------------------
# 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

进入IDE:

第一步:打开菜单项:点击帮助,然后点击编辑自定义属性 步骤2:设置参数:idea.max.intellisense.filesize= 999999999 步骤3:重新启动IDE

适用于64位2020版本

我徒劳地试图找到版本2020的该文件的当前位置。当导航到帮助>编辑自定义属性时,一个新的(空)文件被创建在appData/Roaming/JetBrains/IntelliJIdea2020.1/idea.properties。没有一些教程建议的/bin目录。但是,无论是将接受的答案中的块添加到这个文件中,还是将相同的文件添加到/bin中,都没有对我的配置进行更新。

我最终发现在appData/Roaming/JetBrains/IntelliJIdea2020.1/idea64.exe.vmoptions中存在对相同属性的引用。它是这样的:

-Didea.max.intellisense.filesize=3470

我把它改成了这样,应该能满足我的需要:

-Didea.max.intellisense.filesize=9999

这让我觉得是这个版本中的一个bug,菜单项的行为没有反映所需的内容,但也可能是因为我的特定设置与库存不同。我确实安装了PyCharm和JDK。

PhpStorm 2020

帮助->编辑自定义属性。 文件将在编辑器中打开。将下面的部分粘贴到文件中。

 #---------------------------------------------------------------------
 # 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

File ->失效/重启->重启

有时可能不会更新,您可能需要编辑根想法。属性文件。

为任何版本的Idea编辑此文件

转到应用程序的位置,即linux => /opt/PhpStorm[version]/bin 找到一个叫做idea的文件。备份文件,即idea.properties.old 用任何文本编辑器打开原始文件。 找到idea.max.intellisense.filesize = 替换为idea.max.intellisense.filesize=your_required_size 即idea.max.intellisense.filesize = 10480 默认情况下,这个大小是kb 保存并重新启动IDE。