github-linguist / github-linguist/linguist
[Feature request] Classify Embedded Crystal (`.ecr`) as Crystal
- Dominant language
- Ruby
- Stars
- 13.7k
- Forks
- 5.4k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 17
Description
Hi! Thank you for your work!
I've been working with a few embedded Crystal files recently ([permalink](https://codeberg.org/Sylphrena/Mayling/src/commit/02eb0822f3a601cc40cde43d4694a3ac489af76f/source/util/config/template.ecr)), and noticed that they're counted as HTML in the repo composition, and as Forgejo uses `go-enry`, whose language list is based on linguist's, I thought I'd ask here :D
While embedding crystal into HTML is a common use case, it's in no way limited to that. It's basically a template language, so not directly related to HTML in any way.
Also, in my repo it's technically a KDL config file, so HTML *is* completely wrong in that case 🤣
Would it be possible to count Embedded Crystal (`.ecr`) as Crystal source code? Or maybe the language defined in the filename, like `template.kdl.ecr`.
Having it report as HTML even though it's not is a bit of a bummer :D
Thank you in advance!
----
More information about ECR: https://crystal-lang.org/api/1.17.1/ECR.html
Contributor guide
Assessment
This issue has not been assessed yet.