diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-01 18:17:40 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-06-01 18:17:40 +0200 |
commit | af0eaee01737d26314c9c3618153e99d1eb3e2f1 (patch) | |
tree | e45903bbc85886dcb6568c1f3c3f867b2649f2ca /syntax/gitcommit.vim | |
parent | 730dcb02caab60a6ae5d8b4bdc16d290041061ec (diff) | |
download | vim-polyglot-af0eaee01737d26314c9c3618153e99d1eb3e2f1.tar.gz vim-polyglot-af0eaee01737d26314c9c3618153e99d1eb3e2f1.zip |
Update
Diffstat (limited to '')
-rw-r--r-- | syntax/gitcommit.vim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index 1469bcbc..8e847650 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -26,7 +26,10 @@ syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLi syn match gitcommitOverflow ".*" contained contains=@Spell syn match gitcommitBlank "^[^#].*" contained contains=@Spell -if get(g:, "gitcommit_cleanup") is# "scissors" +syn match gitcommitTrailers "\n\@<=\n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*#\|\n*\%$\)\@=" +syn match gitcommitTrailerToken "^[[:alnum:]-]\+\s*:" contained containedin=gitcommitTrailers + +if get(b:, "gitcommit_cleanup", get(g:, "gitcommit_cleanup", "")) is# "scissors" syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff else @@ -67,6 +70,7 @@ syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$" hi def link gitcommitSummary Keyword +hi def link gitcommitTrailerToken Label hi def link gitcommitComment Comment hi def link gitcommitUntracked gitcommitComment hi def link gitcommitDiscarded gitcommitComment |