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

Syntax highlighting in diffs #21

Open
Piturnah opened this issue Jan 16, 2023 · 3 comments
Open

Syntax highlighting in diffs #21

Piturnah opened this issue Jan 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Piturnah
Copy link
Owner

Piturnah commented Jan 16, 2023

I would like to support syntax highlighting in diffs or at least experiment with how it looks.

See bat, delta

@Piturnah Piturnah added the enhancement New feature or request label Jan 16, 2023
@Piturnah
Copy link
Owner Author

Piturnah commented Jul 9, 2023

Waiting on sharkdp/bat#2618 or another solution to sharkdp/bat#956

@Piturnah
Copy link
Owner Author

We might be able to use syntect directly

@CptPotato
Copy link

CptPotato commented Sep 22, 2023

We might be able to use syntect directly

I gave this a (very crude) shot by simply running the hunk's content through syntect and it doesn't look too bad (see PR). The tricky part is to add a background color highlighting the actual changes within in each line (similar to delta).

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

No branches or pull requests

2 participants