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 you would really think that "one widely-supported declarative non-executable grammar format for syntax highlighting" would be a solved problem by now but it kinda feels like tree sitter is sucking up all the oxygen in that space; don't love how that's going

@technomancy @mcc Treesitter is the biggest engineering and design trash fire that I have seen in a long time.

If I had to give people advice on how to tackle the problem of grammars and editor support, I'd point them to TreeSitter and tell them to *not* do that.

#treesitter

@technomancy @mcc It's as if they looked at the existing problems and requirements, and then tried coming up with the dumbest "solutions" just for shits and giggles.

Even if I tried, I wouldn't be able to come up with the sheer density of painfully wrong decisions they made.

It's all "I'd love to understand the state of their mind that led them to believing that shit to be a valid design/engineering option" the way down.

#treesitter