Sublime Forum

Developer tools: "new syntax from" menu entry

#1

For some syntax there is an option e.g. Developer -> New Syntax from Plain Text.tmLanguage... but on some files this option is not listed under tools.

For example for a JSON file with scope source.json.sublime.project there is no New Syntax from … option.

I have PackageDev Plug-in installed, which I believe adds this option. Why does it show up for some sources but not for others?

0 Likes

#2

It’s only used for converting a .tmLanguage file to its .sublime-syntax equivalent iirc. I haven’t played with .tmLanguage for quite a long time.

0 Likes

#3

Also, this menu item is provided by ST natively (through a Default plugin). PackageDev provides the syntax definition for project files, however.

1 Like

#4

This entry is only present for .tmLanguage Plist files, not JSON or YAML equivalents. Here are some documented steps on how to convert any .tmLanguage, .tmLanguage.json, tmLanguage.yaml, and .tmLanguage.plist to a .sublime-text YAML format: https://github.com/sourcegraph/syntect_server/blob/master/README.md#adding-languages

0 Likes