I want to customize syntax coloring of code rendered in views of my repository #22067
-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @llaenowyd! 👋 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: github.comgithub/linguist/blob/96ad1185828f44bb9b774328a584551ee57ed264/grammars.yml
This file has been truncated. show original 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! |
Beta Was this translation helpful? Give feedback.
Hi @llaenowyd! 👋 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:
github.comgithub/linguist/blob/96ad1185828f44bb9b774328a584551ee57ed264/grammars.yml