aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax/paludis-output-conf.vim
blob: 708792a890934b3ab6583f61ed30013dd9b46910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
" Vim syntax file
" Language:	Paludis output.conf files
" Author:	Ciaran McCreesh
" Copyright:	Copyright (c) 2010 Ciaran McCreesh
" Licence:	You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for output.conf files.
"

if &compatible || v:version < 700
    finish
endif

if exists("b:current_syntax")
  finish
endif

syn region PaludisOutputConfComment start=/^\s*#/ end=/$/

syn region PaludisOutputConfKey start=/^\(\s*[^#]\)\@=/ end=/=\@=/
	    \ contains=PaludisOutputConfKnownKey

syn match PaludisOutputConfEquals /?\?=/ skipwhite
	    \ nextgroup=PaludisOutputConfValue

syn region PaludisOutputConfValue contained start=// end=/$/
	    \ contains=PaludisOutputConfString,PaludisOutputConfUnquoted,
	    \    PaludisOutputConfContinuation,PaludisOutputConfVariable,
	    \    PaludisOutputConfMacro,PaludisOutputConfKnownValue
	    \ skipwhite

syn match PaludisOutputConfContinuation contained /\\$/
	    \ skipnl

syn match PaludisOutputConfUnquoted contained /[^ \t$%"'\\]\+/ skipwhite

syn region PaludisOutputConfString contained start=/"/ end=/"/
	    \ contains=PaludisOutputConfVariable,PaludisOutputConfMacro
	    \ skipwhite

syn keyword PaludisOutputConfKnownKey contained
	    \ handler children messages_children type output_exclusivity
	    \ manager action ignore_unfetched if_success if_failure
	    \ child condition_variable if_true if_false if_unset
	    \ filename keep_on_empty keep_on_success summary_output_manager
	    \ format_debug format_info format_warn format_error format_log
	    \ summary_output_message start_command end_command
	    \ nothing_more_to_come_command succeeded_command
	    \ stdout_command stderr_command extra_message_managers
	    \ extra_output_managers log_path always_keep_output_logs
	    \ quiet

syn keyword PaludisOutputConfKnownValue contained
	    \ buffer file format_messages forward_at_finish ipc tee standard command

syn match PaludisOutputConfVariable contained
            \ /\$\({[^}]\+}\|[a-zA-Z0-9_]\+\)/ skipwhite

syn match PaludisOutputConfMacro contained
            \ /%\({[^}]*}\|[a-zA-Z0-9_]\*\)/ skipwhite

syn region PaludisOutputConfSection start=/^\[/ end=/\]$/ skipwhite
	    \ contains=PaludisOutputConfSectionName

syn keyword PaludisOutputConfSectionName contained
	    \ rule manager

hi def link PaludisOutputConfKnownKey                    Keyword
hi def link PaludisOutputConfKnownValue                  Special
hi def link PaludisOutputConfString                      String
hi def link PaludisOutputConfUnquoted                    Constant
hi def link PaludisOutputConfVariable                    Identifier
hi def link PaludisOutputConfMacro                       Macro
hi def link PaludisOutputConfContinuation                Preproc
hi def link PaludisOutputConfComment                     Comment
hi def link PaludisOutputConfSection                     Type
hi def link PaludisOutputConfSectionName                 Special

let b:current_syntax = "paludis-repositories-conf"