Skip to content
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

Integration with delta for syntax highlighting #201

Open
mplanchard opened this issue Mar 4, 2022 · 1 comment
Open

Integration with delta for syntax highlighting #201

mplanchard opened this issue Mar 4, 2022 · 1 comment

Comments

@mplanchard
Copy link

Is your feature request related to a problem? Please describe.
It can be difficult to parse huge diffs without syntax highlighting

Describe the solution you'd like
Integration with delta in order to get syntax-highlighted diffs, like magit-delta does, would be awesome.

Describe alternatives you've considered
I don't know of any other ways of getting syntax highlighting in diffs.

Additional context
I wanted to pop this open as a feature request, because it's one of the only things I miss when using code-review. I've tried just enabling magit-delta-mode in a code-review buffer, but unsurprisingly that doesn't work.

I'm no emacs lisp expert, but I would be happy to spend some time on this if somebody could point me in the right direction.

@isamert
Copy link

isamert commented Jun 4, 2024

I applied the following diff to code-review-section.el and this makes magit-delta work.

@@ -1625,2 +1625,5 @@ If you want to display a minibuffer MSG in the end."
-                  (magit-wash-sequence
-                   (apply-partially #'magit-diff-wash-diff ())))))
+                  (save-restriction
+                    (narrow-to-region (point) (point-max))
+                    (run-hooks 'magit-diff-wash-diffs-hook)
+                    (magit-wash-sequence
+                     (apply-partially #'magit-diff-wash-diff ()))))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants