Skip to content

Commit bde76da

Browse files
gpanderschrisbra
authored andcommitted
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>
1 parent fc61cfd commit bde76da

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

runtime/syntax/jj.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
if exists('b:current_syntax')
77
finish
88
endif
9-
let b:current_syntax = 'jj'
109

1110
syn match jjAdded "A .*" contained
1211
syn match jjRemoved "D .*" contained
1312
syn match jjChanged "M .*" contained
1413

1514
syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged
1615

16+
syn include @jjCommitDiff syntax/diff.vim
17+
syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff
18+
1719
hi def link jjComment Comment
1820
hi def link jjAdded Added
1921
hi def link jjRemoved Removed
2022
hi def link jjChanged Changed
23+
24+
let b:current_syntax = 'jj'

0 commit comments

Comments
 (0)