1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 12:02:15 +03:00
kakoune/rc/core/diff.kak

12 lines
425 B
Plaintext

hook global BufCreate .*\.(diff|patch) %{
set buffer filetype diff
}
addhl -group / group diff
addhl -group /diff regex "^\+[^\n]*\n" 0:green,default
addhl -group /diff regex "^-[^\n]*\n" 0:red,default
addhl -group /diff regex "^@@[^\n]*@@" 0:cyan,default
hook -group diff-highlight global WinSetOption filetype=diff %{ addhl ref diff }
hook -group diff-highlight global WinSetOption filetype=(?!diff).* %{ rmhl diff }