Skip to content

tmLanguage file doesn't work with Sublime Text 4 #10

@aulemahal

Description

@aulemahal

Description

Hi! It seems the tmLanguage file is not compatible with Sublime Text. At least, not with the version 4, the latest build (4152).

Following the instructions to install the package doesn't do anything, the Cylc syntax doesn't get added to the list.

Reproducible Example

I dug deeper and opened the Cylc.tmLanguage file. In Sublime, I did Tools > Developers > New syntax from Cylc.tmLanguage. This is supposed to convert the file to a sublime-syntax file.

In Sublime's console I got:

patterns and includes are not supported within captures: {'0': {'patterns': [{'include': '#headers'}]}}
patterns and includes are not supported within captures: {'1': {'patterns': [{'include': '#jinja2'}, {'match': '[\\w\\+\\^\\$][\\w\\+\\-\\^\\$\\/\\t ,:]*', 'name': 'keyword.graph.cylc'}]}, '2': {'name': 'keyword.operator.assignment.cylc'}}
patterns and includes are not supported within captures: {'0': {'patterns': [{'include': '#graphSyntax'}]}}
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python38/sublime_plugin.py", line 1659, in run_
    return self.run()
  File "/opt/sublime_text/Packages/Default.sublime-package/convert_syntax.py", line 433, in run
  File "/opt/sublime_text/Packages/Default.sublime-package/convert_syntax.py", line 358, in convert
  File "/opt/sublime_text/Packages/Default.sublime-package/convert_syntax.py", line 269, in make_context
  File "/opt/sublime_text/Packages/Default.sublime-package/convert_syntax.py", line 328, in make_context
Exception: unknown pattern type: dict_keys(['name', 'patterns'])

Maybe the latest Sublime has gone incompatible ? Or maybe that the tmLanguage has changed in ways incompatible with Sublime's implementation ?

It's not a major problem. If the solution isn't easy, it could at least be helpful to indicate on the README that some versions of Sublime are not supported.

I am running Sublime on a Fedora 38 Linux machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions