NTBBloodbath / doom-one.nvim

doom-emacs' doom-one Lua port for Neovim
MIT License
211 stars 32 forks source link

Add support for `diff` filetype #41

Closed psliwka closed 7 months ago

psliwka commented 7 months ago

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: Screenshot_20240225_223737 After: Screenshot_20240225_223820 Stock Doom Emacs for comparison: Screenshot_20240225_223903