Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
出于某种原因,PHPStorm 决定将任何名为 root.js 的文件呈现为纯文本,而无需 JS 着色和调试。有谁知道如何纠正这个问题???它快把我逼疯了!!!
转到IDE Settings -> File types并Text files在已识别的文件类型中查找。可能有一个名为的添加模式root.js
IDE Settings -> File types
Text files
root.js
对于较新的版本,此设置位于Editor -> File types
Editor -> File types
我刚刚在 PHPStorm 5.0.4 中尝试过这个,我没有这个问题 - 所有的 JS 都是彩色编码的。
我使用右键单击 > 新建 > JavaScript 文件来添加文件。