I am using Sublime Text 3 with NASTRAN-Textmate-Bundle (https://github.com/bguest/NASTRAN-Textmate-Bundle) which defines the syntax for this finite element analysis language. I am attempting to color code the various entity types using a custom Monokai.sublime-color-scheme file.
The syntax is defined as follows in NASTRAN.tmLanguage:
<?xml version="1.0" encoding="UTF-8" ?>
<plist version="1.0">
<dict>
<key>uuid</key>
<string>B105B642-00BE-4057-AB54-4D90188976DF</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#case_control</string>
</dict>
.
.
</array>
.
.
<key>repository</key>
<dict>
<key>sol_types</key>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.sol_types.nastran</string>
</dict>
</dict>
<key>match</key>
<string>(\bSOL (101|SESTATIC|103|SEMODES|105|SEBUCKL|106|NLSTATIC|107|SEDCEIG|108|SEDFREQ|109|SEDTRAN|110|SEMCEIG|111|SEMFREQ|112|SEMTRAN|114|CYCSTATX|115|CYCMODE|116|CYCBUCKL|118|CYCFREQ|128|SENLHARM|129|NLTRAN|144|AESTAT|145|SEFLUTTR|146|SEAERO|153|NLSCSH|159|NLTCSH|190|DBTRANS|200|DESOPT|400|NONLIN|600|SESTATIC|700|NLTRAN|))</string>
</dict>
</dict>
</dict>
</plist>
My custom Monokai.sublime-color-scheme in Packages/User contains the following:
{
"name": "Monokai",
"rules":
[
{
"name": "Nastran Case Control",
"scope": "keyword.sol_types.nastran",
"foreground": "var(cyan)"
},
]
}
However, Sublime does not recognize this as nothing gets colored cyan.
I have tried different entity types (sol_nastran is an example of many) and various combinations of "keyword.scope.language" that I could think of.
Seems like this should be very simple, but I must be missing something very obvious. I apologize if that is the case -- I am a structural analyst, not a coder.
Thank you in advance for your help,
Michael