IntelliJ IDEA 插件可以折叠 .conf 文件吗?

2024-02-15

我有一个使用 Lift 框架构建的 Scala 应用程序。它有一些 .conf 文件。当我在 IntelliJ IDEA Ultimate Fancy Pants Edition 中打开这些 .conf 文件时,我没有看到任何用于折叠这些文件中的大括号的按钮。热键也不会这样做。浏览了插件,没有找到适用的。是否有任何解决方案可以在 .conf 文件中启用代码折叠?

Update:
Here is an illustration of what would be lovely. Those "-" and "+" icons do not appear in .conf files: enter image description here


相关插件是HOCON https://plugins.jetbrains.com/plugin/10481-hocon/ plugin.

To install https://www.jetbrains.com/help/idea/managing-plugins.html, click the Get button from the above JetBrains Marketplace link. Or, from within IntelliJ, go to Settings/Preferences (Ctrl+Alt+S for Windows; +Comma for Mac) and select Plugins, then click Marketplace to search for the plugin and install it. Restart IntelliJ to enable it.

要确认,请返回设置/首选项并选择Editor > 文件类型。你现在应该看到HOCON https://en.wikipedia.org/wiki/HOCON(人类优化的配置对象表示法)列为“可识别的文件类型”的文件类型。点击HOCON你应该看到*.conf在“文件名模式”下。

你所有的.conf文件现在应该出现在 IntelliJ 中,并带有语法突出显示和代码折叠 https://www.jetbrains.com/help/idea/code-folding-settings.html.

2020 年 10 月编辑删除Scala https://plugins.jetbrains.com/plugin/1347-scala插件参考,因为它似乎不再支持 HOCON 文件。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

IntelliJ IDEA 插件可以折叠 .conf 文件吗? 的相关文章

随机推荐