Use TextMate bundles
Projects can contain file types unknown to IntelliJ IDEA. While IntelliJ IDEA comes with the built-in support for many programming and scripting languages. If you want to have syntax highlighting for the project-specific languages, use the powerful IntelliJ IDEA's integration with the text editor TextMate.
All the available bundles are listed on the Settings/Preferences dialog Ctrl+Alt+S.
page In theLearning how to describe languages using the TextMate grammar is out of the scope of this document. Refer to product documentation for more details about TextMate.
Prerequisites
Make sure that:
You have already downloaded bundles you want to use. You can, for example, find the bundles you want to install on GitHub or Subversion.
Before you start working with TextMate Bundles, make sure that TextMate Bundles plugin is installed and enabled. Press Ctrl+Alt+S, go to Plugins and inspect the Installed tab to ensure the plugin is enabled.
Importing bundles
Suppose you want IntelliJ IDEA to highlight syntax of the OCaml files. For this purpose, you have already downloaded the OCaml TextMate Bundle. It now resides on your hard disk, and you only have to import this bundle into IntelliJ IDEA.
In the Settings/Preferences dialog Ctrl+Alt+S, select Editor | TextMate Bundles.
Click and locate the desired bundle on your disk:
Click OK to apply the changes. The OCaml bundle appears in the list of recognized bundles:
Testing
Once a TextMate bundle is added, IntelliJ IDEA provides syntax highlighting for the file types registered with the bundle. Here's a sample OCaml code fragment that uses the TextMate bundle we've added earlier: