The already present highlight groups supported only the builtin diff mode. Syntax highlighting for diff filetype uses separate, not linked highlight groups, that were previously unset, impairing user experience when e.g. opening *.diff files, or using nvim as external editor for git CLI (as the builtin git filetype inherits most of its highlight groups from diff by default).
This commit configures required highlight groups in a way that matches the style used by Doom Emacs as close as possible (full compatibility would sadly require changes to syntax/diff.vim as well).
As a side effect, buffers generated by the tpope/vim-fugitive plugin become correctly styled as well.
Sample screenshot before this change:
After:
Stock Doom Emacs for comparison:
The already present highlight groups supported only the builtin diff mode. Syntax highlighting for
diff
filetype uses separate, not linked highlight groups, that were previously unset, impairing user experience when e.g. opening *.diff files, or using nvim as external editor for git CLI (as the builtingit
filetype inherits most of its highlight groups fromdiff
by default).This commit configures required highlight groups in a way that matches the style used by Doom Emacs as close as possible (full compatibility would sadly require changes to
syntax/diff.vim
as well).As a side effect, buffers generated by the
tpope/vim-fugitive
plugin become correctly styled as well.Sample screenshot before this change: After: Stock Doom Emacs for comparison: