Sublime Forum

Old & New Syntax in Same Package? (.tmLanguage & .sublime-syntax)

#1

I was wondering how ST would behave if in the same project coexisted two same-named syntax definitions, one with the old format and the other with the newer one (i.e. MyLang.tmLanguage alongside MyLang.sublime-syntax).

ST2 should ignore the MyLang.sublime-syntax file, since it’s not aware of that format.

Will ST3 give precedence to the new format and ignore the old one?

If this was the case, than the two could live side by side without conflicts.

The reason for keeping both formats it’s not just to preserve backward compatibility with ST2 users (which is good anyhow) but it has to do with the fact that the tmLanguage of the specific repository on which this discussion started is actually used by GitHub Linguist for syntax highlighting:

Although Linguist includes the TexMate grammar via a submodule, and in theory it could just keep pointing to the latest commit with a tmLanguage syntax, the language syntax will still need to be updated from time to time since the language is still Beta and will still undergo changes.

1 Like

#2

Will ST3 give precedence to the new format and ignore the old one?

Yes

3 Likes