0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

runtime(jj): Support diffs in jj syntax

related: #16364

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Gregory Anders 2025-01-03 10:34:24 +01:00 committed by Christian Brabandt
parent fc61cfd60e
commit bde76da4d0
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -6,7 +6,6 @@
if exists('b:current_syntax')
finish
endif
let b:current_syntax = 'jj'
syn match jjAdded "A .*" contained
syn match jjRemoved "D .*" contained
@ -14,7 +13,12 @@ syn match jjChanged "M .*" contained
syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged
syn include @jjCommitDiff syntax/diff.vim
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff
hi def link jjComment Comment
hi def link jjAdded Added
hi def link jjRemoved Removed
hi def link jjChanged Changed
let b:current_syntax = 'jj'