robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Christian Clasonvim-patch:partial:f1dcd14fc5d4 (#21602)c4942880be

master
1.4 KiB30 linesraw
1" Vim syntax file
2" Language:	hg/sl (Mercurial / Sapling) commit file
3" Maintainer:	Ken Takata <kentkt at csc dot jp>
4"  		Max Coplan <mchcopl@gmail.com>
5" Last Change:	2022-12-08
6" License:	VIM License
7" URL:		https://github.com/k-takata/hg-vim
8
9if exists("b:current_syntax")
10  finish
11endif
12
13syn match hgcommitComment "^\%(SL\|HG\): .*$"            contains=@NoSpell
14syn match hgcommitUser    "^\%(SL\|HG\): user: \zs.*$"   contains=@NoSpell contained containedin=hgcommitComment
15syn match hgcommitBranch  "^\%(SL\|HG\): branch \zs.*$"  contains=@NoSpell contained containedin=hgcommitComment
16syn match hgcommitAdded   "^\%(SL\|HG\): \zsadded .*$"   contains=@NoSpell contained containedin=hgcommitComment
17syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
18syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
19
20syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
21syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
22
23hi def link hgcommitComment Comment
24hi def link hgcommitUser    String
25hi def link hgcommitBranch  String
26hi def link hgcommitAdded   Identifier
27hi def link hgcommitChanged Special
28hi def link hgcommitRemoved Constant
29
30let b:current_syntax = "hgcommit"