QuakeC / HexenC Detection
Opened this issue · 4 comments
Feature Description
It would be great if .qc files were detected as QuakeC or if there was some way to create a server setting that let me add my own language mappings like that since I recognize it's a very niche thing. Similarly, HexenC uses .hc which means my Hexen II mod repos are all being flagged as HolyC which is I would think just about as obscure and niche as HexenC ever was and it would be neat to be able to override that.
It would be nice to have a general way for server operators to add their own languages though for instances like this.
Screenshots
No response
You can remap language mappings with global config or .gitattributes.
From what I see you can just alias them to C, but in case I'm wrong you'd need to file a request in chroma and linguist for full support. QuakeC is already in linguist database.
Oh. From the documentation that looked like it was only regarding the syntax highlighting which I don't so much care about. I didn't realize that was the same system that identified the language breakdown on the repo pages.
Regardless, I just tried adding this to my gitea.ini and restarted the server:
[highlight.mapping]
.qc=QuakeC
.hc=QuakeC
And that did nothing. Repo still has no language assigned. It didn't even appear to do anything for the syntax highlighting - .qc files still just show as "Plaintext". I also tried quakec in case it is case sentitive and wants it all lowercase and that didn't work either. Again, I'm not really asking for chroma or syntax highlight support - just the ability to identify the language of the files in the repo that users see when scrolling through the repos (and that let users filter just repos with that primary language).
Even if it just put unrecognized files into an "Other" category that would be more beneficial than just ignoring them. It's strange that a repo with 100 text files gitea doesn't recognize the extension of and a single Makefile, for instance, flags the entire repo as 100% Makefiles.
Then I misunderstood somewhat, I assumed that it's about the highlighting - most issues about languages ask about highlighting and never for the language breakdown. Sorry about that.
.qc will be supported though, it was added 3 weeks ago to linguist so it's just a matter of time when it'll be pulled enry.
For .hc you'll have to file a request in linguist and I'm not quite sure if there's an override...