I want to customize syntax coloring of code rendered in views of my repository

I see github applies a syntax coloring to code in view, it seems to be completely static, different rules for different languages but not extensible or customizable.

I wish there was a way to set this up by the repository owner, not a user setting in the browser for reinterpreting github’s rendering.

Same as for whitespace decisions that are built into the code and displayed on github as-is, but it has to be out of band from the code in the case of the syntax coloring.

Use case is rainbow brackets, they help a lot with reading functional code. Looking at my code in my repository, although I tried to make it readable when I was writing it in the IDE where I have a rainbow brackets plugin, it is not as readable on github where it’s presented for others to try to read.

Hi @llaenowyd! :wave: Welcome to the Community!

That would be a neat feature, yes! Syntax highlighting is not actually set by GitHub itself, though.

We use open source TextMate-style language grammars for syntax highlighting, which are available here:

You could find the issue tracker for the specific grammar you’re interested in and open an issue (or contribute a feature!) there. Linguist pulls in grammar updates with each new release, which usually happens every couple of weeks. This should get fixed on GitHub.com shortly after that happens!

I hope this is helpful!