文件大小超过配置的限制(2560000),代码洞察功能不可用

Fla*_*ash 149 intellij-idea

我正在尝试在Jetbrains WebStorm 8中处理大型Javascript文件,并且我在编辑窗口的顶部收到一条消息:

文件大小超过配置的限制(2560000).代码洞察功能不可用.

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

Álv*_*lez 220

在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
Run Code Online (Sandbox Code Playgroud)

  • 如果您运行的是IntelliJ 2016,则可以从"帮助"菜单的"编辑自定义属性"中更改此设置. (7认同)
  • 请记住为Webstorm 11.0.3添加类似'999999'的值,删除此字段或将其置于极高值(约12个9秒)不起作用. (4认同)

Hen*_*nry 51

这是根据ÁlvaroGonzález的答案以及如何在Mac上的IntelliJ IDEA中增加IDE内存限制而构建的

转到帮助>编辑自定义属性

加:

idea.max.intellisense.filesize=999999
Run Code Online (Sandbox Code Playgroud)

重新启动IDE.

  • 如果您想知道,该值以KB为单位,默认值为2500. https://www.jetbrains.com/help/idea/tuning-the-ide.html (4认同)

Bre*_*mer 19

PhpStorm 2020

  1. 帮助 -> 编辑自定义属性。
  2. 文件将在编辑器中打开。将以下部分粘贴到文件中。
 #---------------------------------------------------------------------
 # 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
Run Code Online (Sandbox Code Playgroud)
  1. 文件 -> 无效/重新启动 -> 重新启动

有时这可能不会更新,您可能需要编辑根 idea.properties 文件。

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

  1. 转到应用程序位置,即 linux => /opt/PhpStorm[version]/bin
  2. 查找名为 idea.properties 的文件 备份文件,即 idea.properties.old
  3. 使用任何 txt 编辑器打开原件。
  4. 寻找idea.max.intellisense.filesize=
  5. 替换为idea.max.intellisense.filesize=your_required_size ieidea.max.intellisense.filesize=10480 NB by default this size is in kb
  6. 保存并重新启动 IDE。


sen*_*982 15

编辑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
Run Code Online (Sandbox Code Playgroud)

保存并重新启动IDEA

  • 这个答案是不完整的.您必须指定用户应使用这些设置配置IDE的过程. (2认同)

Ema*_*ayi 8

进入IDE:

第 1 步:打开菜单项:单击“帮助”,然后单击“编辑自定义属性”

STEP 2:设置参数:

idea.max.intellisense.filesize= 999999999

  • 这似乎是之前几个答案的重复。 (6认同)
  • 最后还需要重新启动 IDE! (3认同)
  • @isherwood 从技术上讲,鉴于值(9 的数量)较高,因此不会重复。 (2认同)

And*_*lin 6

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

编辑product64.vmoptions对我没有用,但编辑idea.properties工作正常.另外,为了能够处理大型文件,您可能需要更改product64.vmoptions/product.vmoptions中-Xms和-Xmx的值


squ*_*gee 5

为了阐明Alvaro的答案,您需要在命令行列表中添加-D选项。我正在使用PyCharm,但是概念是相同的:

pycharm{64,.exe,64.exe}.vmoptions:
<code>
    -server
    -Xms128m
    ...
    -Didea.max.intellisense.filesize=999999 # <--- new line
</code>
Run Code Online (Sandbox Code Playgroud)

  • 您不必添加“ -D”,而需要使用idea.properties文件而不是vmoptions文件。 (4认同)

jfu*_*unk 5

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

  • PyCharm CE: /Applications/PyCharm CE.app/Contents/bin/idea.properties
  • 网络风暴: /Applications/WebStorm.app/Contents/bin/idea.properties


ish*_*ood 5

对于 64 位 2020 版本

我试图为 2020 版找到此文件的当前位置,但徒劳无功。当导航到Help > Edit Custom Properties一个新的(空)文件时,在appData/Roaming/JetBrains/IntelliJIdea2020.1/idea.properties. 有些教程建议没有 /bin 目录。但是,无论是将接受的答案中的块添加到此文件,还是将相同的文件添加到 /bin 都不会导致我的配置更新。

我终于发现在appData/Roaming/JetBrains/IntelliJIdea2020.1/idea64.exe.vmoptions. 它看起来像这样:

-Didea.max.intellisense.filesize=3470
Run Code Online (Sandbox Code Playgroud)

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

-Didea.max.intellisense.filesize=9999
Run Code Online (Sandbox Code Playgroud)

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