DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.35k stars 28 forks source link

Sublime Text Syntax Highlighting #422

Open waterstone15 opened 1 year ago

waterstone15 commented 1 year ago

I'd like to start migrating some CoffeeScript projects to Civet. I've tried to create a Sublime Text syntax file/package, but doing so is outside my wheelhouse. After attempting and failing for few hours I've landed here seeking help.

Any chance a sublime text syntax highlighting package is on the docket?

edemaine commented 1 year ago

According to https://www.sublimetext.com/docs/syntax.html, Sublime supports TextMate grammars. Civet's TextMate grammar is far from good, but it's better than nothing. Can you see whether it's possible to install it as is? Perhaps via Tools -> Developer -> New Syntax.

waterstone15 commented 1 year ago

@edmaine Yes, in theory – I was trying to use civet.json (I tried repackaging it as .sublime-package and .sublime-syntax, converting it .yaml and .xml, etc.) but after thorough floundering I came here.

ps. 'Tools → Developer → New Syntax' creates a .sublime-syntax .yaml file, which afaik is not a compatible format with civet.jsons format.

edemaine commented 1 year ago

It might make sense to ask the Sublime community for suggestions on how to import a JSON TextMate grammar. I assume this is a general (and hopefully solved) problem. Please report back if you find out anything!

waterstone15 commented 1 year ago

In theory ST supports XML/plist .tmLanguage files, but when I try to convert the civet.json to XML the output doesn't seem to be something ST can read.