]> git.lizzy.rs Git - micro.git/blob - syntax_files/puppet.micro
Proper window resize handling
[micro.git] / syntax_files / puppet.micro
1 ## Nano syntax highlighting for Puppet.
2 ##
3 syntax "Puppet" "\.pp$"
4
5 #This goes first, so the normal builtins will override in some classes
6 ## Paramerers
7 color brightwhite "^[[:space:]]([a-z][a-z0-9_]+)"
8 color brightgreen "\$[a-z:][a-z0-9_:]+"
9
10 ## List of built in types, also catches defines
11 color yellow "\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\b"
12 color yellow "\b(class|define|if|else|undef|inherits)\b"
13 color red "(=|-|~|>)"
14
15 ## Constants
16 color brightblue "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
17 ## Ruby "symbols"
18 color magenta "([      ]|^):[0-9A-Z_]+\b"
19 ## Regular expressions
20 color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
21 ## Shell command expansion is in `backticks` or like %x{this}.  These are
22 ## "double-quotish" (to use a perlism).
23 color brightblue "`[^`]*`" "%x\{[^}]*\}"
24 ## Strings, double-quoted
25 color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
26 ## Expression substitution.  These go inside double-quoted strings,
27 ## "like ${this}".
28 color brightgreen "\$\{[^}]*\}"
29 ## Strings, single-quoted
30 color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
31 ## Comments
32 color cyan "#[^{].*$" "#$"
33 color brightcyan "##[^{].*$" "##$"
34 ## Some common markers
35 color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
36 ## Trailing spaces
37 color red "[[:space:]]+$"
38