Skip to content

How to obtain dhall.sublime-syntax from dhall.tmLanguage #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kukimik opened this issue Dec 14, 2022 · 2 comments
Closed

How to obtain dhall.sublime-syntax from dhall.tmLanguage #1

kukimik opened this issue Dec 14, 2022 · 2 comments

Comments

@kukimik
Copy link

kukimik commented Dec 14, 2022

Hello! Sorry for bothering you in what looks like a rather private repo. However, I'd be grateful for some help.

I believe that you obtained the Dhall/dhall.sublime-syntax file from the .tmLanguage file provided by the VSCode plugin https://github.com/dhall-lang/vscode-language-dhall. (That's because your .sublime-syntax file has the same bug, see dhall-lang/vscode-language-dhall#11). Did you do it in an automated way? I tried the approach described in the README, but "Plugin Development: Convert Syntax to .sublime-syntax" fails with the following error (in Sublime Text build 4143):

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 328, in make_context
Exception: unknown pattern type: dict_keys(['name', 'patterns'])

I'm interested in creating a package for Sublime Text with Dhall syntax highlighting. I want to base it on https://github.com/dhall-lang/vscode-language-dhall, but it would be nice to have a .sublime-syntax file along with the .tmLanguage file (although the .tmLanguage file itself seems to work and probably is sufficient), and it would be nice if it could be obtained in an automated way.

Disclaimer: there is a $200 bounty set for restoring Dhall syntax highlighting in Sublime after https://github.com/SQbQxeKd3JHD8/SublimeDhall disappeared. If you are interested, go ahead and grab it! I'm interested more in restoring the syntax highlighting than in the bounty.

@ninth-dev
Copy link
Owner

hi @kukimik , it actually wasn't generated from the .tmLanguage, it might have been from the repo you linked: https://github.com/SQbQxeKd3JHD8/SublimeDhall when it was still around.

@kukimik
Copy link
Author

kukimik commented Dec 28, 2022

Ah, thanks a lot. I thought it was generated from the .tmLanguage file because I have another .sublime-syntax file that was copied from https://github.com/SQbQxeKd3JHD8/SublimeDhall, which looks vastly different. However, I have no information about the chronology/versions/etc., so for example large refactoring work could have happened between the two versions. Thanks again for your reply!

@kukimik kukimik closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants