Open Purpzie opened 2 years ago
Rhai is a scripting language, so I'm not sure if it is actually used in any repo as a main development language.
However, I'll try the .gitattributes
trick.
It might be better to use js
in order to get support for interpolated strings...
True, but other scripting languages are already highlighted, such as lua.
Also oops yeah almost forgot about interpolated strings. I chose rust because I figured js would freak out without ()
in if statements.
Also oops yeah almost forgot about interpolated strings. I chose rust because I figured js would freak out without
()
in if statements.
It actually does OK with if
... I tried JavaScript on my own repo and it seems to work fine!
Rust seems to mainly trip on interpolated strings, switch
statements, import
and export
statements etc.
https://github.com/search?l=&q=a+extension%3Arhai&type=code
dunno if this is what youre looking for but here you go @Purpzie search for repos using rhai
Now that GitHub support cargo dependencies, there is quite a few codebases that support rhai scripts! https://github.com/rhaiscript/rhai/network/dependents
I tried to submit to github/linguist
quite a while ago but for some reason which I cannot remember I couldn't.
Maybe somebody can help do that?
I noticed that
.rhai
files don't have any highlighting on github, and that no issues exist about this yet. Github's highlighting is powered by github/linguist, and they allow people to submit new languages if they're popular enough (used in >200 repos). Unfortunately github's search is pretty broken atm so I'm not sure how many repositories rhai is in.Until github supports it, throwing this in a repo's
.gitattributes
will highlight it by pretending it's rust: