IntelliJ IDEA插件可以折叠.conf文件吗? [英] IntelliJ IDEA plugin to fold .conf files?

查看:1178
本文介绍了IntelliJ IDEA插件可以折叠.conf文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a Scala app built with Lift framework. It has a few .conf files. When I open those .conf files in my IntelliJ IDEA Ultimate Fancy Pants Edition, I do not see any buttons to fold those curly braces in those files. Hotkeys do not do it either. Browsed for plugins, none applicable found. Is there any solution to enable code folding in .conf files?

更新:
这是一个可爱的例子.这些-"和"+"图标未出现在.conf文件中:

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

推荐答案

这些.conf文件属于HOCON类型(人类优化的配置对象表示法").要启用折叠功能,您必须强制编辑器对它们进行同样的处理.在IntelliJ设置中,如下所示进行配置:

Those .conf files are of HOCON type ("Human-Optimized Config Object Notation"). To enable folding them, you have to force the editor treat them as such. In IntelliJ settings, configure it as illustrated:

Preferences->Editor->File Types,然后在HOCON文件类型中添加文件名模式.

Preferences->Editor->File Types, and there add filename patterns to HOCON filetype.

这篇关于IntelliJ IDEA插件可以折叠.conf文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆