【发布时间】:2014-05-28 06:55:47
【问题描述】:
我正在尝试在 Jetbrains WebStorm 8 中处理一个大型 Javascript 文件,我在编辑窗口顶部收到一条消息:
文件大小超出配置限制 (2560000)。代码洞察功能不可用。
如何提高“配置限制”以访问所有功能?
【问题讨论】:
标签: intellij-idea
我正在尝试在 Jetbrains WebStorm 8 中处理一个大型 Javascript 文件,我在编辑窗口顶部收到一条消息:
文件大小超出配置限制 (2560000)。代码洞察功能不可用。
如何提高“配置限制”以访问所有功能?
【问题讨论】:
标签: intellij-idea
在 IntelliJ 2016 及更高版本中,您可以从帮助菜单中更改此设置,编辑自定义属性(由 @eggplantbr 评论)。
在旧版本中,没有 GUI 可以执行此操作。但是如果你edit the IntelliJ IDEA Platform Properties文件,你可以改变它:
#---------------------------------------------------------------------
# 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
【讨论】:
这是根据 Álvaro González 的回答和 How to increase IDE memory limit in IntelliJ IDEA on Mac? 构建的
转到帮助 > 编辑自定义属性
添加:
idea.max.intellisense.filesize=999999
重新启动 IDE。
【讨论】:
C:\Users\<username>\.AndroidStudio2.3\idea.properties。但最后它奏效了。非常感谢!
编辑 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
【讨论】:
转到 IDE:
第 1 步: 打开菜单项:点击Help,然后点击Edit Custom Properties
第 2 步: 设置参数:
idea.max.intellisense.filesize= 999999999
【讨论】:
Instructions for changing this settings in latest Jetbrains products
编辑 product64.vmoptions 对我不起作用,但编辑 idea.properties 工作正常。 此外,为了能够处理大文件,您可能需要更改 product64.vmoptions / product.vmoptions 中 -Xms 和 -Xmx
【讨论】:
为了澄清Alvaro's 的答案,您需要将 -D 选项添加到命令行列表中。我用的是 PyCharm,但概念是一样的:
pycharm{64,.exe,64.exe}.vmoptions:
<code>
-server
-Xms128m
...
-Didea.max.intellisense.filesize=999999 # <--- new line
</code>
【讨论】:
bin 目录中有一个PhpStorm.bat 文件表明有一个-Didea.properties.file=... JVM 选项:-?
对于那些不知道在哪里找到他们正在谈论的文件的人。在我的机器 (OSX) 上,它位于:
/Applications/PyCharm CE.app/Contents/bin/idea.properties
/Applications/WebStorm.app/Contents/bin/idea.properties
【讨论】:
我徒劳地试图找到该文件在 2020 版中的当前位置。导航到Help > Edit Custom Properties 时,会在appData/Roaming/JetBrains/IntelliJIdea2020.1/idea.properties 创建一个新(空)文件。正如一些教程所建议的那样,没有 /bin 目录。但是,将 accepted answer 中的块添加到此文件或将同一文件添加到 /bin 都不会导致我的配置更新。
我终于发现appData/Roaming/JetBrains/IntelliJIdea2020.1/idea64.exe.vmoptions 中存在对同一属性的引用。它看起来像这样:
-Didea.max.intellisense.filesize=3470
我改成这个了,应该可以满足我的需求了:
-Didea.max.intellisense.filesize=9999
这让我觉得这是这个版本中的一个错误,其中菜单项的行为不能反映所需的内容,但也可能是我的特定设置与库存有所不同。我确实安装了 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
这有时可能不会更新,您可能需要编辑根 idea.properties 文件。
为任何版本的 Idea 编辑此文件
idea.max.intellisense.filesize=
idea.max.intellisense.filesize=your_required_size
即idea.max.intellisense.filesize=10480
NB by default this size is in kb
【讨论】:
Webstorm 的 Windows 默认安装位置:
C:\Program Files\JetBrains\WebStorm 2019.1.3\bin\idea.properties
我去了x4 default for intellisense和x5 for file size
(不过,我的商务工作站很牛:第 8 代 i7、32Gb RAM、NVMe PCIE3.0x4 SDD、幸灾乐祸等、幸灾乐祸等)
#---------------------------------------------------------------------
# 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
【讨论】:
从帮助菜单中更改上述选项对我不起作用。 您已编辑 idea.properties 文件并更改为一些大编号。
MAC: /Applications/<Android studio>.app/Contents/bin[Open App contents]
Idea.max.intellisense.filesize=999999
WINDOWS: IDE_HOME\bin\idea.properties
【讨论】: