Hi there!
After using Sublime for about five years, I am finally getting serious about customizing it. I was trying to set up syntax highlighting for ExtendScript, which is basically Adobe’s dialect of ES3 JavaScript and comes with tons of extra classes and their methods and properties.
Since it is based on JavaScript, the idea is to use Sublime’s default JavaScript hightlighting and then add the additional highlighting of the ExtendScript classes on top.
Now, I found a ExtendScript .tmLanguage
file for Visual Studio code here that should do exactly that.
Using Sublime, I converted this to a .sublimeSyntax
file and saved it into my user package.
While it gets detected and I can select it in the syntax settings it does not apply any new Syntax highlighting to my files, it just stays at the default JavaScript highlighting. Also, when I move my caret to a ExtendScript class name and check the scope, it does not show me anything related to ExtendScript.
Does anybody know what I am doing wrong / what is missing?
Here is the file that I have (shortening the class / properties lists for better readability).
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: ExtendScript
file_extensions:
- jsx
- jsxinc
scope: source.jsx
contexts:
main:
- include: scope:source.js
- match: \b(File|Folder|$)\b
comment: This is js core
scope: support.class.jsx
- match: \b(Bounds|Button|Checkbox)\b
comment: This is js script ui
scope: support.class.jsx
- match: \b(update|remove|createPackage)\b
comment: This is ID methods
scope: support.class.jsx
- match: \b(activeDocument|pages|documentOffset)\b
comment: This is ID properties
scope: support.class.jsx
- match: \b(Assignment|assignments|AssignedStory)\b
comment: This is ID classes
scope: support.class.jsx
- match: \b(Application|AVLayer|BlendingMode)\b
comment: this is AE
scope: support.class.jsx
Thanks!