[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntactic fontification of diff hunks

From: Kaushal Modi
Subject: Re: Syntactic fontification of diff hunks
Date: Thu, 16 Aug 2018 17:44:50 -0400

Looks nice.

Where you supposed to attach the patch too? :)

On Thu, Aug 16, 2018 at 5:42 PM Juri Linkov <address@hidden> wrote:
Most version control sites like gitlab/github highlight syntax
in code snippets inside diff hunks, for example:

This is very helpful when looking at code changes.  I missed this feature in Emacs
for a long time.  This is why I asked a question about a possible implementation in
but no one had an answer.

Then I realized that much simpler would be just to use the same approach
implemented by diff-mode refinement, i.e. to take each diff hunk one by
one, and like the diff refinement highlights more fine-grained changes,
do the same for syntax highlighting according to the language in
compared files/commits.

You can see the result at the following screenshot:


Kaushal Modi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]