maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

  1" vim: noexpandtab ts=4 sw=4
  2
  3if exists("b:current_syntax")
  4	finish
  5endif
  6
  7" Lexer-defined rules
  8syn match		maddyComment	"#.*"
  9syn region      maddyString		start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline
 10
 11syn region		maddyBlock		start="{" end="}" transparent fold
 12
 13hi def link maddyComment	Comment
 14hi def link maddyString		String
 15
 16" Parser-defined rules
 17syn match		maddyMacroName	"[a-z0-9_]" contained containedin=maddyMacro
 18syn match		maddyMacro      "$(.\{-})" contains=maddyMacroName
 19
 20syn match		maddyMacroDefSign "=" contained
 21syn match		maddyMacroDef     "\^$([a-z0-9_]\{-})\s=\s.\+" contains=maddyMacro,maddyMacroDefSign
 22
 23hi def link maddyMacroName			Identifier
 24hi def link maddyMacro				Special
 25hi def link maddyMacroDefSign		Special
 26
 27" config.Map values
 28syn keyword maddyBool yes no
 29
 30syn match maddyInt '\<\d\+\>'
 31syn match maddyInt '\<[-+]\d\+\>'
 32syn match maddyFloat '\<[-+]\d\+\.\d*\<'
 33
 34syn match maddyReference /[ \t]&[^ \t]\+/ms=s+1 contains=maddyReferenceSign
 35syn match maddyReferenceSign /&/ contained
 36
 37hi def link maddyBool		Boolean
 38hi def link maddyInt		Number
 39hi def link maddyFloat		Float
 40
 41hi def link maddyReferenceSign	Special
 42
 43" Module values
 44
 45" grep --no-file -E 'Register.*\(".+", ' **.go | sed -E 's/.+Register.*\("([^"]+)", .+/\1/' | sort -u
 46syn keyword maddyModule
 47	\ checks
 48	\ command
 49	\ dane
 50	\ dkim
 51	\ dnsbl
 52	\ dnssec
 53	\ dummy
 54	\ extauth
 55	\ external
 56	\ file
 57	\ identity
 58	\ imap
 59	\ imap_filters
 60	\ imapsql
 61	\ limits
 62	\ lmtp
 63	\ loader
 64	\ local_policy
 65	\ milter
 66	\ modifiers
 67	\ msgpipeline
 68	\ mtasts
 69	\ mx_auth
 70	\ pam
 71	\ pass_table
 72	\ plain_separate
 73	\ queue
 74	\ regexp
 75	\ remote
 76	\ replace_rcpt
 77	\ replace_sender
 78	\ require_matching_rdns
 79	\ require_mx_record
 80	\ require_tls
 81	\ rspamd
 82	\ shadow
 83	\ smtp
 84	\ sql_query
 85	\ sql_table
 86	\ static
 87	\ submission
 88
 89syn keyword maddyDispatchDir
 90	\ check
 91	\ modify
 92	\ default_source
 93	\ source
 94	\ default_destination
 95	\ destination
 96	\ reject
 97	\ deliver_to
 98	\ reroute
 99	\ dmarc
100
101" grep --no-file -E 'cfg..+\(".+", ' **.go | sed -E 's/.+cfg..+\("([^"]+)", .+/\1/' | sort -u
102syn keyword maddyModDir
103	\ add
104	\ add_header_action
105	\ allow_multiple_from
106	\ api_path
107	\ appendlimit
108	\ attempt_starttls
109	\ auth
110	\ autogenerated_msg_domain
111	\ body_canon
112	\ bounce
113	\ broken_sig_action
114	\ buffer
115	\ cache
116	\ case_insensitive
117	\ certs
118	\ check_early
119	\ client_ipv4
120	\ client_ipv6
121	\ compression
122	\ conn_max_idle_count
123	\ conn_max_idle_time
124	\ conn_reuse_limit
125	\ debug
126	\ defer_sender_reject
127	\ del
128	\ domains
129	\ driver
130	\ dsn
131	\ ehlo
132	\ endpoint
133	\ enforce_early
134	\ enforce_testing
135	\ entry
136	\ error_resp_action
137	\ expand_replaceholders
138	\ fail_action
139	\ fail_open
140	\ file
141	\ flags
142	\ force_ipv4
143	\ fs_dir
144	\ fsstore
145	\ full_match
146	\ hash
147	\ header_canon
148	\ helper
149	\ hostname
150	\ imap_filter
151	\ init
152	\ insecure_auth
153	\ io_debug
154	\ io_error_action
155	\ io_errors
156	\ junk_mailbox
157	\ key_column
158	\ key_path
159	\ keys
160	\ limits
161	\ list
162	\ local_ip
163	\ location
164	\ lookup
165	\ mailfrom
166	\ max_logged_rcpt_errors
167	\ max_message_size
168	\ max_parallelism
169	\ max_received
170	\ max_recipients
171	\ max_tries
172	\ min_mx_level
173	\ min_tls_level
174	\ mx_auth
175	\ neutral_action
176	\ newkey_algo
177	\ none_action
178	\ no_sig_action
179	\ oversign_fields
180	\ pass
181	\ perdomain
182	\ permerr_action
183	\ quarantine_threshold
184	\ read_timeout
185	\ reject_threshold
186	\ relaxed_requiretls
187	\ required_fields
188	\ require_sender_match
189	\ require_tls
190	\ requiretls_override
191	\ responses
192	\ rewrite_subj_action
193	\ run_on
194	\ score
195	\ selector
196	\ set
197	\ settings_id
198	\ sig_expiry
199	\ sign_fields
200	\ sign_subdomains
201	\ softfail_action
202	\ SOME_action
203	\ source
204	\ sqlite3_busy_timeout
205	\ sqlite3_cache_size
206	\ sqlite3_exclusive_lock
207	\ storage
208	\ table
209	\ table_name
210	\ tag
211	\ target
212	\ targets
213	\ temperr_action
214	\ tls
215	\ tls_client
216	\ use_helper
217	\ user
218	\ value_column
219	\ write_timeout
220
221hi def link maddyModDir		Identifier
222hi def link maddyModule		Identifier
223hi def link maddyDispatchDir		Identifier
224
225let b:current_syntax = "maddy"