Skip to content

Conversation

@Azkae
Copy link

@Azkae Azkae commented Oct 4, 2025

Improve syntax highlighting by sending the emacs diff colors to delta.
This way, the colors should better match the background.

I have also added magit-delta-max-size to avoid running delta on large files since it's easier to do now (I can move it to later PR if you prefer).

This should also fix #28.

A few notes:

  • magit-delta-mode is now a global mode.

  • Since we are using diff faces, we need to have the correct faces already loaded when enabling magit-delta-mode. For example, if we enable magit-delta-mode before setting up a theme, we would use the wrong colors.

    Using (add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1))) works since by the time we turn on magit mode, the faces should be correct.

Before:

Screenshot 2025-10-04 at 13 54 25

After:

Screenshot 2025-10-04 at 15 26 10

@Azkae Azkae changed the title Better colors & limit size Use emacs diff colors Oct 10, 2025
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

Successfully merging this pull request may close these issues.

No easy way to disable

1 participant