github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.29k stars 4.25k forks source link

Add language: Cosmo #6429

Open R-unic opened 1 year ago

R-unic commented 1 year ago

Language name

Cosmo

URL of example repository

https://github.com/cosmo-lang/cosmo/tree/master/examples

URL of syntax highlighting grammar

https://github.com/cosmo-lang/vscode-cosmo/blob/main/syntaxes/cosmo.tmLanguage.json

Most popular extensions

.cos, .⭐

Detected language

None

Nixinova commented 1 year ago

Dot-star file extension is a bit of a weird one and doesn't seem to be used outside of the cosmo-lang examples folder (search link). .cos seems to have a lot of junk (search link) - what would be a way to narrow down which of those are actually Cosmo? Any certain keywords that uniquely identify it?

R-unic commented 1 year ago

yeah i noticed that shortly after posting this. so the only keywords i could imagine would be unique to cosmo in a .cos file might be fn, from, until, unless, is, in, or mut. you could also use the function name puts. i'm aware all of those keywords are present in other languages, so the only keywords universally unique to cosmo are every and $.

i very much appreciate your time in considering to add cosmo! thank you for all you do <3

johnmays commented 10 months ago

I bet true .cos files are getting close to 2000. Here is a search for path:*.cos fn with ~1.4k. And when you use other keywords like stream, you can tell there are .cos files floating around without the fn keyword. As for .⭐ there are only 15 files at the moment. And according to #5756, each extension needs at least 2000.