FOSS geek, privacy advocate, digital archivist, mental illness advocate, gamer

Should I self-host cgit? [RDDB]

Published on: by hyperreal

2 min read


Note: [RDDB] = Rubber Duck DeBugging


ME: Should I self-host cgit?

RUBBER DUCK: Okay, but is it going to trigger your just-right OCD to the point where you become frustrated and end up deleting it and using an other-hosted git service?

ME: Uh, probably.

RUBBER DUCK: Well, what can you do to minimize the potential for just-right frustration? I can see the UI in particular being a sore point for you.

ME: I don’t know. Maybe I can customize the UI. It’s all CSS, right? There is this one dude who has a customized cgit that I can use as a reference. I can customize the syntax highlighting too. But the syntax highlighting cgit uses does not have support for justfiles.

RUBBER DUCK: Maybe you can contribute to the upstream highlight program to add justfile support. You can use an already-existing justfile syntax source as a reference for keywords and identifiers.

ME: But. The highlight program is very different. It seems I would have to add to the entire file all the scripting languages that I or others would want to use inside a justfile. The Zed example has a programmatic way of injecting those languages into the main justfile syntax source using a sort of template, and it is automatically generated. The highlight program needs it to be written all manually in a .lang file.

RUBBER DUCK: Can’t you just combine the .lang syntax files of the languages you typically use in justfiles into just.lang?

ME: I can’t just concatenate them, but I suppose I can do something like that, that combines the keywords and identifiers.

RUBBER DUCK: If that becomes too hard or infeasible, then maybe you can just do what Neovim does, and just add syntax highlight support for keywords and identifiers that are only used in justfiles, and leave the scripting languages used in each just command unhighlighted or have them use a two-tone colorscheme.

ME: That would be fine, I guess. Another thing I’d want to add to the upstream highlight project is support for the Catppuccin color palette. At least this seems like it would be a fairly easy problem to solve.

RUBBER DUCK: Then, supposing you do all this, would that sufficiently satisfy your just-right preferences? Or would you end up doing all that and then abandoning it as if the sunk-cost fallacy was but a fart in a windstorm?

ME: Well, I guess I won’t know the answer to that until I do it.

RUBBER DUCK: For your sake, I hope it is one mighty powerful fart that can withstand the windstorm. In fact, I hope that the fart is what causes the windstorm.

ME: Yeah. I mean, it wouldn’t be that big of a deal if I decided to abandon it. At the very least, I would contribute to the highlight project, even though I might never again use my own contributions, and surely that counts for something.

RUBBER DUCK: Also, it’s a very real possibility that, if you abandon using cgit, you might decide to pick up where you left off and use it again in the future, if you find a way to satisfy or tolerate whatever “flaw” made you abandon it.

ME: True enough. I mean, I’m unemployed, and unemployable. I really have nothing better to do with my time, anyway. It wouldn’t end up being a waste of time.