robin/laufey

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

zeertzjqvim-patch:62d8f3d: runtime: Revert several "mark invalid contact addresses" commits (#37192)ab20681c52

master
3.3 KiB90 linesraw
1" Vim syntax file
2" Language:	initng .i files
3" Maintainer:	Elan Ruusamäe <glen@pld-linux.org>
4" URL:		http://glen.alkohol.ee/pld/initng/
5" License:	GPL v2
6" Version:	0.13
7" Last Change:	$Date: 2007/05/05 17:17:40 $
8"
9" Syntax highlighting for initng .i files. Inherits from sh.vim and adds
10" in the hiliting to start/stop {} blocks. Requires vim 6.3 or later.
11
12if &compatible || v:version < 603
13	finish
14endif
15
16if exists("b:current_syntax")
17	finish
18endif
19
20syn case match
21
22let is_bash = 1
23syn include @shTop syntax/sh.vim
24
25syn region	initngService			matchgroup=initngServiceHeader start="^\s*\(service\|virtual\|daemon\|class\|cron\)\s\+\(\(\w\|[-/*]\)\+\(\s\+:\s\+\(\w\|[-/*]\)\+\)\?\)\s\+{" end="}" contains=@initngServiceCluster
26syn cluster initngServiceCluster	contains=initngComment,initngAction,initngServiceOption,initngServiceHeader,initngDelim,initngVariable
27
28syn region	initngAction			matchgroup=initngActionHeader start="^\s*\(script start\|script stop\|script run\)\s*=\s*{" end="}" contains=@initngActionCluster
29syn cluster initngActionCluster		contains=@shTop
30
31syn match	initngDelim				/[{}]/	contained
32
33syn region	initngString			start=/"/ end=/"/ skip=/\\"/
34
35" option = value
36syn match	initngServiceOption		/.\+\s*=.\+;/ contains=initngServiceKeywords,initngSubstMacro contained
37" option without value
38syn match	initngServiceOption		/\w\+;/ contains=initngServiceKeywords,initngSubstMacro contained
39
40" options with value
41syn keyword	initngServiceKeywords	also_stop need use nice setuid contained
42syn keyword	initngServiceKeywords	delay chdir suid sgid start_pause env_file env_parse pid_file pidfile contained
43syn keyword	initngServiceKeywords	pid_of up_when_pid_set stdout stderr syncron just_before contained
44syn keyword	initngServiceKeywords	provide lockfile daemon_stops_badly contained
45syn match	initngServiceKeywords	/\(script\|exec\(_args\)\?\) \(start\|stop\|daemon\)/ contained
46syn match	initngServiceKeywords	/env\s\+\w\+/ contained
47
48" rlimits
49syn keyword	initngServiceKeywords	rlimit_cpu_hard rlimit_core_soft contained
50
51" single options
52syn keyword	initngServiceKeywords	last respawn network_provider require_network require_file critical forks contained
53" cron options
54syn keyword	initngServiceKeywords	hourly contained
55syn match	initngVariable			/\${\?\w\+\}\?/
56
57" Substituted @foo@ macros:
58" ==========
59syn match	initngSubstMacro		/@[^@]\+@/	contained
60syn cluster initngActionCluster		add=initngSubstMacro
61syn cluster shCommandSubList		add=initngSubstMacro
62
63" Comments:
64" ==========
65syn cluster	initngCommentGroup		contains=initngTodo,@Spell
66syn keyword	initngTodo				TODO FIXME XXX contained
67syn match	initngComment			/#.*$/ contains=@initngCommentGroup
68
69" install_service #macros
70" TODO: syntax check for ifd-endd pairs
71" ==========
72syn region	initngDefine			start="^#\(endd\|elsed\|exec\|ifd\|endexec\|endd\)\>" skip="\\$" end="$" end="#"me=s-1
73syn cluster shCommentGroup			add=initngDefine
74syn cluster initngCommentGroup		add=initngDefine
75
76hi def link	initngComment			Comment
77hi def link initngTodo				Todo
78
79hi def link	initngString			String
80hi def link initngServiceKeywords	Define
81
82hi def link	initngServiceHeader		Keyword
83hi def link	initngActionHeader		Type
84hi def link initngDelim				Delimiter
85
86hi def link	initngVariable			PreProc
87hi def link	initngSubstMacro		Comment
88hi def link	initngDefine			Macro
89
90let b:current_syntax = "initng"