I am currently using the following lines from this answer in my .vimrc to fix my colorscheme when using vimdiff:
highlight DiffAdd cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
This works great for ordinary text file diffs. Unfortunately, when this is enabled and I diff two java files, the lines that are added (in the diff) lose their syntax highlighting.
Is there a way to make syntax highlighting run after the lines above, so that I can git reasonable diff highlighting while preserving syntax highlighting?