Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA plugin to fold .conf files?

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

like image 366
Vasily802 Avatar asked Jun 20 '17 01:06

Vasily802


1 Answers

The relevant plugin is the HOCON plugin.

To install, 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.

To confirm, go back to Settings/Preferences and select Editor > File Types. You should now see HOCON (Human-Optimized Config Object Notation) file types among those listed as "Recognized File Types". Click HOCON and you should see *.conf under "File name patterns".

All your .conf files should now appear in IntelliJ with syntax highlighting and code folding.

Edited Oct 2020 to remove Scala plugin reference, as it no longer seems to support HOCON files.

like image 178
Woodchuck Avatar answered Sep 20 '22 15:09

Woodchuck