Files
neovim/runtime/syntax/jjdescription.vim
ash 118759aa6b vim-patch:8f09684: runtime(jjdescription): Don't require a space to start comments (#33523)
Since jj v0.24.0 (December 2024), `JJ:` comments are recognised even
when not followed by a space.

closes: vim/vim#17130

8f09684569
2025-04-18 01:05:10 +00:00

26 lines
789 B
VimL

" Vim syntax file
" Language: jj description
" Maintainer: Gregory Anders <greg@gpanders.com>
" Last Change: 2024 May 8
" 2025 Apr 17 by Vim Project (don't require space to start comments, #17130)
if exists('b:current_syntax')
finish
endif
syn match jjAdded "A .*" contained
syn match jjRemoved "D .*" contained
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 = 'jjdescription'