New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HolyC Syntax Highlighting? #22904
Comments
Workaround: or use gitattributes to tell the highlighter that some files are C code. Like this one: |
Ah my nightmare, Regex. I knew I'd have to learn it eventually. Honestly though, thank you so much for this, I don't think HolyC will be that hard to manufacture using this. Appreciate it. |
If it works with |
As per github-linguist/linguist#4512, Github does match it based on the |
Realistically, this looks like it should be a breeze to do considering it seems that the GitHub format is very similar to Chroma. From what @silverwind linked, I found this: https://github.com/codingdandy/holyc.tmbundle which should be sufficient. |
Yeah, so the job is to start with https://github.com/alecthomas/chroma/blob/master/lexers/embedded/c.xml and adapt the individual rules based on https://github.com/codingdandy/holyc.tmbundle/blob/master/Syntaxes/HolyC.tmLanguage to create the chroma lexer. My earlier idea of just adding an alias to the C lexer is not right, the language is too different from C to be considered an alias. |
I've gone ahead and made a pull request for this on Chroma: alecthomas/chroma#750 |
Thanks, so we just need to wait until next chroma release and then update it. |
Is that it @silverwind? I thought I had to edit "go-enry" or something |
For the syntax highlighting, chroma is enough. https://github.com/go-enry/go-enry is used for the language stats bar, but it may be that they already support HolyC given that they source some data from linguist, but if you like, please double-check. |
Well I'm not sure if that worked, I figured I could do:
However on a repo it's still recoginzed as "PlainText": |
Try:
|
That worked! Thanks all! |
Feature Description
Would it be possible to get HolyC syntax highlighting for Gitea? I am working on a Git site dedicated around the language, but the fact that there is no syntax highlighting really takes away from the general aesthetic.
HolyC is really similar to C in terms of syntax except for really variables and function names. Below is a screenshot of said implementation on GitHub.
I understand this may be a very niche topic, and likely may not be added, however in that case, could I atleast be provided with documentation on writing the syntax highlighting manually? Thanks.
Screenshots
The text was updated successfully, but these errors were encountered: