0

I want to modify the existing Textmate Groovy bundle so that it can be used for my Jenkinsfile files.

In Syntaxes/Groovy.tmLanguage, there is the fileTypes section:

<key>fileTypes</key>
<array>
    <string>groovy</string>
    <string>gvy</string>
</array>

However, these are file extensions, not file names, as the reference doc I've found says:

fileTypes (line 2) — this is an array of file type extensions that the grammar should (by default) be used with.

How can I make the bundle match on full filename for my Jenkinsfile?

Sam
  • 5,997
  • 5
  • 46
  • 66

1 Answers1

0

It turns out that full filenames are actually supported in the fileTypes section, despite what the doc said (possibly because that doc is from version 1). There's an example of a match on Rakefile here.

Therefore, I could just do this:

<array>
    <string>groovy</string>
    <string>gvy</string>
    <string>Jenkinsfile</string>
</array>
Sam
  • 5,997
  • 5
  • 46
  • 66
  • And in fact, someone has opened a PR to do just this: https://github.com/textmate/groovy.tmbundle/pull/18 – Sam Jul 18 '19 at 09:23