IntelliJ IDEA plugin to fold .conf files?

Vasily802 picture Vasily802 · Jun 20, 2017 · Viewed 8.3k times · Source

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?

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

Answer

Vasily802 picture Vasily802 · Sep 5, 2017

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

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