2016-03-21 16:16:02 +00:00
## Nano syntax highlighting for Puppet.
##
2016-08-25 00:15:36 +00:00
syntax "puppet" "\.pp$"
2016-03-21 16:16:02 +00:00
#This goes first, so the normal builtins will override in some classes
## Paramerers
2017-03-01 14:30:35 +00:00
color default "^[[:space:]]([a-z][a-z0-9_]+)"
color identifier.var "\$[a-z:][a-z0-9_:]+"
2016-03-21 16:16:02 +00:00
## List of built in types, also catches defines
2017-03-01 14:30:35 +00:00
color type "\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"
color statement "\b(class|define|if|else|undef|inherits)\b"
color symbol "(=|-|~|>)"
2016-03-21 16:16:02 +00:00
## Constants
2017-03-01 22:08:56 +00:00
color identifier.var "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
2016-03-21 16:16:02 +00:00
## Ruby "symbols"
2017-03-01 22:08:56 +00:00
color symbol "([ ]|^):[0-9A-Z_]+\b"
2016-03-21 16:16:02 +00:00
## Regular expressions
2017-03-01 14:30:35 +00:00
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
2016-03-21 16:16:02 +00:00
## Shell command expansion is in `backticks` or like %x{this}. These are
## "double-quotish" (to use a perlism).
2017-03-01 14:30:35 +00:00
color constant.string "`[^`]*`" "%x\{[^}]*\}"
2016-03-21 16:16:02 +00:00
## Strings, double-quoted
2017-03-01 14:30:35 +00:00
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
2016-03-21 16:16:02 +00:00
## Expression substitution. These go inside double-quoted strings,
## "like ${this}".
2017-03-01 14:30:35 +00:00
color special "\$\{[^}]*\}"
2016-03-21 16:16:02 +00:00
## Strings, single-quoted
2017-03-01 14:30:35 +00:00
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
2016-03-21 16:16:02 +00:00
## Comments
2017-03-01 14:30:35 +00:00
color comment "#[^{].*$" "#$"
2017-03-03 16:47:03 +00:00
color comment.bright "##[^{].*$" "##$"
2016-03-21 16:16:02 +00:00
## Some common markers
2017-03-01 14:30:35 +00:00
color todo "(XXX|TODO|FIXME|\?\?\?)"
2016-03-21 16:16:02 +00:00
## Trailing spaces
2017-03-01 14:30:35 +00:00
color indent-char.whitespace "[[:space:]]+$"
2016-03-21 16:16:02 +00:00