Add Jenkinsfile support for Webstorm

24 September, 2019

Jenkinsfile is essential for your Continuous Integration pipeline - so it would be only wise to have syntax highlighting enabled

Sadly WebStorm does not support the Groovy Plugin - but happy us, there is a a good alternative to that: you may use the TextMate bundle in 4 easy steps:

  1. Download the repository

  2. Extract the zip file to some directory on your system where you want to keep it forever

  3. Edit the Syntaxes/Groovy.tmLanguage - file so that Jenkinsfile is represented like so:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>fileTypes</key>

<array>

<string>groovy</string>

<string>gvy</string>

<string>Jenkinsfile</string>

</array>
  1. In WebStorm go to File > Settings > Editor > TextMate bundles click on the + sign and point it to the directory you extracted the zip to.

et voila - you have a syntax highlighted Jenkinsfile

emoji-bulbThis should work with other JetBrains IDEs too which do not natively support the Groovy Plugin

emoji-bulbTextMate was originally a general-purpose GUI text editor which JetBrains happens to support the Macros, i.e. TextMate bundles, for.

Author: Marcel Michelfelder


Add a comment

Want to get in touch?