A thing that has always frustrated me about github/bitbucket, as a language designer, is that you can't teach the forge to syntax highlight files in your own custom formats.

Now the existence of Codeberg/git.gay means potentially I could create a PR to forgejo to add this feature and it would get added to the forges I actually use. Perhaps at some point I will do this.

Anybody know off the top of their heads what syntax-highlighter format Codeberg/Forgejegejo even uses?

Oh. it's… oh.

It's… custom Go code… on a per-language basis. they use something called Chroma and the way Chroma works is it wrote custom lexers in Go for each language they want to support. Um. Hm.

This is actually the one single approach they could have attempted which prevents custom pluggable highlighters on a per-repo basis.

https://hey.hagelb.org/@technomancy/statuses/01KNQJ9H3R64BEHE1QWNBXZKVW

technomancy (@[email protected])

@mcc last I checked it was https://github.com/alecthomas/chroma ;  I remember sending a patch to support Fennel and it was handled pretty promptly

hey.hagelb.org
@mcc That really sucks, oof.
@xgranade I see the argument for it if you plan to support only a closed set of languages, but it does kinda put a bullet directly in the head of my goal of "support an open set of languages"
@mcc Yeah, it sucks in a completely reasonable way, but it still sucks...
@mcc @xgranade It might be neat if you could generate a parallel directory structure of language-independent substring attributes in a precommit hook that can be interpreted by the syntax highlighter when viewing the original file. Like a source map meets RTF.