I think we actually meet the requirements for github syntax highlighting currently. Normally it is 200 repos. But rn, 2000 files with the extension also qualifies.
Looks like we have 2.4k: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+app+OR+platform+OR+hosted+OR+interface+OR+package&type=code
This maybe be useful https://github.com/github-linguist/linguist/blob/master/CONTRIBUTING.md#adding-a-language
For context on requiring just a file count: https://github.com/github-linguist/linguist/issues/5756
Is it worth waiting for Module Params and some time hardening tree sitter in the wild?
idk...maybe. Not sure how hard it is to update once added.
I think if we're eligible we should go for it sooner rather than later...you never know when someone else is going to try to claim the .roc extension! :sweat_smile:
Also, I am not 100% sure we are legible, but I think we are at a point where it is worth making a PR and asking what they think.
if anyone wants to go for this, my only request is try to get syntax highlighting for string interpolation working so that e.g. "num: \(Num.toStr num)"
highlights the \(
and )
differently from the rest of the string literal, and the part inside the parens ideally like a normal expression
Aside, there are at least 638 unique apps using roc: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+%22packages+%7B%22&type=code&p=2
sweet! :smiley:
anyone want to go for this?
Hmm, actually, I think that sure is pulling in a lot of not roc files (though hard to say for sure cause github only lets me look at 5 pages or results) I think this is a more accurate query that matches what the lingist repo. Probably won't get accepted: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+%22packages+%7B%22+OR+%22exposes+%5B%22+OR+%22imports+%5B%22+NOT+user%3Aroc-lang&type=code
tried to search for header pieces that would guarantee something is a roc file.
We probably could make an issue on their repo with the search just to see what they think. If they think it is not enough, maybe they can specifically give us a better query and we can use that.
I work on Astro and we have a .astro syntax, GitHub added us fairly early in our lifetime, so I wouldn't be surprised if Roc is eligible already. The barrier is lower than I expected.
does anyone want to volunteer to try adding it and see what they say? :smiley:
Do we have a grammar? I don't think anyone's developed a TM grammar
I think the vs code extension has one
Last updated: Jul 06 2025 at 12:14 UTC