Add Roc Language
This adds syntax grammar for Roc, an up and coming functional language.
@lildude It would be amazing to get this in before 7.28.0 is deployed tomorrow. A lot of us are doing Advent of Code with Roc this year and would really appreciate some syntax highlighting.
Checklist:
- [x] I am adding a new language.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
- Search results for each extension:
- https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.roc+app
- Search results for each extension:
- [x] I have included a real-world usage sample for all extensions added in this PR:
- Sample source(s):
- Sample license(s):
- They are all Universal Permissive License
- [x] I have included a syntax highlighting grammar: https://github.com/ivan-demchenko/roc-vscode-unofficial
- Even though this repo says "unofficial", it was requested to be used by Richard Feldman, the creator of Roc.
- [x] I have added a color
- Hex value:
#7c38f5 - Rationale: Primary color on https://roc-lang.org
- Hex value:
- [ ] I have updated the heuristics to distinguish my language from others using the same extension.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
@lildude I updated the samples with real-world code and rebased off master. Let me know if you need anything else.
@lildude do the samples need to be complete and compile on their own, or can they be snippets of a larger file or library?
They need to be real world examples… we want samples that demonstrate how people really use the language, not contrived hogwash. We don't care if they compile or not as all we're doing is using them to train the classified.
@lildude I updated the samples to match the requirements. Let me know if there are any other issues.
@ryanb @lildude Would it be better to use a tree-sitter grammar? This one is complete and i suspect would provide better highlighting than a textmate style one: https://github.com/faldor20/tree-sitter-roc
@ryanb @lildude Would it be better to use a tree-sitter grammar? This one is complete and i suspect would provide better highlighting than a textmate style one: https://github.com/faldor20/tree-sitter-roc
Nope as linguist has no control over the use of tree-sitter grammars as this is entirely up to the team that maintains the highlighting engine as mentioned previously in https://github.com/github-linguist/linguist/discussions/6073. As with the same question in https://github.com/github-linguist/linguist/pull/6689#issuecomment-1913086778 this is not likely to happen any time soon given the low usage of this language.
Ahh, thanks for clarifying, that's a shame. I'll raise this again sometime in the next decade if roc achieves some level of success 😅
@lildude any update on the status of this? Do you need anything else from me?
Thanks for merging! Looking forward to seeing it live.