ziglang / sublime-zig-language

Zig language support for Sublime Text
MIT License
85 stars 25 forks source link

syblime-syntax #41

Closed haze closed 3 years ago

haze commented 4 years ago

I am unable to convert the .tmLanguage files to .sublime-syntax with my latest build of sublime text. Is anyone else able to do the conversion so I can use the highlighter with things like Zola?

emekoi commented 4 years ago

just to make sure, but have you tried going using Tools > Developer > New Syntax File from Textmate Syntax Definition (YAML).tmLanguage with theZig.YAML-tmLanguage file open? nvm, the mainfield in the the YAML-tmLangauge file makes the conversion currently impossible. i will push a fix later today.

emekoi commented 4 years ago

i added the file but some work is needed as 14 of the patterns are incompatible with the sregex engine. also are you aware of a way to generate .sublime-syntax files from .YAML-tmLanguage files or vice-versa?

haze commented 4 years ago

I was unable to find a tool / solution for converting that file, sorry.

emekoi commented 4 years ago

no problem. thanks for looking!

gwenzek commented 3 years ago

@emekoi Would you be interested if I added a few enhacement to the .sublime-syntax ?

Things I'd want to do:

For context I'm the original author of the C# syntax (it has been improved a lot over the years by others).

This will make the syntax diverge from the VS Code one, but I think it will be for the best.

emekoi commented 3 years ago

@gwenzek sure go ahead! on a side note, would it be possible to backport any of those changes to the .*-tmLanguage syntax files?

gwenzek commented 3 years ago

would it be possible to backport any of those changes to the .*-tmLanguage syntax files?

I guess for the simple one like adding operators it will be doable, but for the rest I'm not sure what's the point. A syntax is only useful in the context of an ecosystem. The scopes name must match the scopes used by theme creators. Sublime Text do have guidelines about those, but they have some differences with other editor ecosystems.

emekoi commented 3 years ago

solved by #45.