Sublime Forum

Status of core 'sublime-syntax' definitions

#1

It is impossible to mix the legacy tmLanguage format with the new sublime-syntax. So, when I started to write my own sublime-syntax I checked the format of those language definitions in core, which I want to include. I was surprised to find the language definitions in the core packages to still be tmLanguage files. The packages date from 2015, though I have applied all updates, that came so far…

The Git repo for the core packages seems to already use the new format. The package I am interested in specifically is the Packages/XML, which has a XML.sublime-syntax file, that dates to 25 May 2017.

Now I am confused and therefore I would like to know:

Have the core packages been updated and it is just my local installation, that is missing the new ones?

If not, when are the new language definitions in core going to be reliable?

Thanks.

0 Likes

#2

What build of Sublime are you running? If I set up a pristine portable build of 3208, this is the result of looking for resource files of type tmLanguage:

>>> sublime.find_resources("*.tmLanguage")
['Packages/Text/Plain text.tmLanguage']

Or if you will, the only syntax that is still in the older format in recent builds is the Plain Text syntax, and it’s just a scope definition with no rules that applies to txt files.

If you’re getting different results, then I would guess that you’re either not running a recent build or you have overrides of the core packages installed in your Installed Packages folder, which would cause Sublime to completely ignore the shipped versions in favor of those ones.

In such a case, no matter how recent your build of Sublime is, it will always only use the overrides. My OverrideAudit package should be able to tell you if that’s happening; the Override report flags packages that are completely overridden, such as Python and JavaScript in this sample image:

1 Like

#3

Every release takes a snapshot of the github repo’s master branch at the time (with very few exceptions). There are tags for what the respective builds used.

1 Like

#4

3207 on Windows 10

I didn’t know this command. Thanks for pointing it out! As I tried it myself, it showed, that all the core packages are, indeed, using the new format, which had me dazzled, since this was contradictory to what is physically available to my installation. But, in the meanwhile, I found out:

I have two disks. an SSD and a conventional one. I had symlinked parts of my “Program Files” folder to the conventional disk. One of those links was Sublime3. While I was assuming, that I am running from the symlinked folder, it seems, that this is not the case anymore.

While the file manager respects the link, the command line does not show any link when doing dir, so I have another issue to investigate now, but it, clearly, is not an ST issue anymore.

Thanks for helping out, also to @FichteFoll. Issue solved, case closed :slight_smile:

Bye, Andreas

0 Likes