QuakeC / HexenC Detection #14960

Open
opened 2025-11-02 11:26:47 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @nephatrine on GitHub (Sep 15, 2025).

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

Originally created by @nephatrine on GitHub (Sep 15, 2025). ### 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_
GiteaMirror added the type/proposaltype/upstream labels 2025-11-02 11:26:47 -06:00
Author
Owner

@TheFox0x7 commented on GitHub (Sep 15, 2025):

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.

@TheFox0x7 commented on GitHub (Sep 15, 2025): You can remap language mappings [with global config](https://docs.gitea.com/administration/config-cheat-sheet#highlight-mappings-highlightmapping) or [.gitattributes](https://github.com/github-linguist/linguist/blob/main/docs/overrides.md). 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](https://github.com/alecthomas/chroma) and [linguist](https://github.com/github-linguist/linguist) for full support. QuakeC is already in linguist database.
Author
Owner

@nephatrine commented on GitHub (Sep 15, 2025):

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).

@nephatrine commented on GitHub (Sep 15, 2025): 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).
Author
Owner

@nephatrine commented on GitHub (Sep 15, 2025):

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.

@nephatrine commented on GitHub (Sep 15, 2025): 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.
Author
Owner

@TheFox0x7 commented on GitHub (Sep 15, 2025):

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...

@TheFox0x7 commented on GitHub (Sep 15, 2025): 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](https://github.com/go-enry/go-enry). For `.hc` you'll have to file a request in [linguist](https://github.com/github-linguist/linguist) and I'm not quite sure if there's an override...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14960