DataGrip 2024.1 Help

TextMate Bundles

For a number of languages that are not supported in DataGrip, for example, PHP, Python, Ruby, and Java, the IDE still provides syntax highlighting to improve your coding experience if you occasionally need to examine such code. For more information about describing languages using the TextMate grammar, refer to the TextMate official website.

Syntax highlighting for these languages is based on TextMate grammars, and DataGrip is shipped with a collection of grammar files for different languages. All the available bundles are listed on the Editor | TextMate Bundles page of the Settings dialog (Ctrl+Alt+S) .

You can also download and use custom TextMate bundles for other languages.

Enable the TextMate Bundles plugin

This functionality relies on the TextMate Bundles plugin, which is bundled and enabled in DataGrip by default. If the relevant features aren't available, make sure that you didn't disable the plugin.

  1. Press Ctrl+Alt+S to open settings and then select Plugins.

  2. Open the Installed tab, find the TextMate Bundles plugin, and select the checkbox next to the plugin name.

Importing bundles

Suppose you want DataGrip 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 DataGrip.

  1. In the Settings dialog (Ctrl+Alt+S) , select Editor | TextMate Bundles.

  2. Click the Add button and locate the desired bundle on your disk:

    Select the downloaded bundle
  3. Click OK to apply the changes. The OCaml bundle appears in the list of recognized bundles:

    New TextMate bundle


Once a TextMate bundle is added, DataGrip provides syntax highlighting for the file types registered with the bundle. Here's a sample Shell script that uses the TextMate bundle we've added earlier:

Code highlighting
Last modified: 26 May 2024