-
Notifications
You must be signed in to change notification settings - Fork 398
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
🚀 Syntax highlight for git patches frontmatter #1863
Comments
Hi @OJarrisonn, could you post an example plain text snippet that you'd like delta to syntax highlight? |
Sure thing
This is part of a patch from lore.kernel.org. It would be cool if delta could both render the diff part at the bottom and highlight the fields (like |
I am working on something that may address your issue, hopefully in something approaching a timely fashion. Can you answer some questions about the format? I am particularly interested in that first line:
I am familiar with the format noted by Git's |
From what i knew, the email was always
From the content of the patch you showed me i think this was sent via gmail instead of git send-email and that's why it uses a different "email" on the mailer line |
For any parties interested in the frontmatter highlighting: sublimehq/Packages#4111 Here's the original commit, as highlighted by the PR above. Note that this is upstream, as rendered by Sublime Text. I don't know if there's a feature therein that Syntect (the engine for Delta and Bat) doesn't support. |
Now that I think about it, maybe what I was doing is not at all what @OJarrisonn wanted. Do you want front matter displayed before the Delta output? 😊 Yeah, this is nothing like that. Sorry. |
Delta currently has an amazing support for git patch files (generated with
git format-patch
). But it would be nice if delta had some level of syntax highlight also in the patch frontmatter just like some terminal text editors do when one's writting a commit.Fields like
Subject
,From
,Date
, etc could be colored with some special color, and also email strings like<me@mymail.com>
Example
Helix editor: the
signed-off-by
and other markers in the footer of a commit message are highlighted.The text was updated successfully, but these errors were encountered: