feat: ignore email quoting characters in front of a diff #141

Closed
opened 2026-03-03 15:40:18 +00:00 by entropitor · 2 comments
entropitor commented 2026-03-03 15:40:18 +00:00

Prerequisites

Problem

It would be nice if any > in front of a git diff was silently ignored so it's easier to do code-review through diffs and with https://git-send-email.io/ / sourcehut style patch review.

Proposed solution

If there is a > in front of a line, act as if it's not there. So we keep getting syntax highlighting for patch files even if they are in email reply style.

So

> diff --git a/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py b/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py
> @@ -0,0 +1,37 @@
> +from typing import Annotated, final
> +

is rendered the same as

diff --git a/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py b/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py
@@ -0,0 +1,37 @@
+from typing import Annotated, final
+

Alternatives considered

Manually remove the > and later re-add them.

### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/diffs.nvim/issues) ### Problem It would be nice if any `> ` in front of a git diff was silently ignored so it's easier to do code-review through diffs and with https://git-send-email.io/ / sourcehut style patch review. ### Proposed solution If there is a `> ` in front of a line, act as if it's not there. So we keep getting syntax highlighting for patch files even if they are in email reply style. So ```diff > diff --git a/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py b/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py > @@ -0,0 +1,37 @@ > +from typing import Annotated, final > + ``` is rendered the same as ```diff diff --git a/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py b/pleevi_modules/pleevi_data/pleevi_data/api/pxc_webhook_router.py @@ -0,0 +1,37 @@ +from typing import Annotated, final + ``` ### Alternatives considered Manually remove the `> ` and later re-add them.
barrettruth commented 2026-03-04 07:17:40 +00:00

working on this now

working on this now
barrettruth commented 2026-03-05 15:32:06 +00:00

awesome! v0.3.0 is coming out today. thanks so much for your issue and let me know if this resolves it.

awesome! v0.3.0 is coming out today. thanks so much for your issue and let me know if this resolves it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/diffs.nvim#141
No description provided.