mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:bde76da: runtime(jj): Support diffs in jj syntax
related: vim/vim#16364
bde76da4d0
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
parent
6aceab7c20
commit
f1f42ec063
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user