puppet.nanorc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. ## Nano syntax highlighting for Puppet.
  2. ##
  3. syntax "puppet" "\.pp$"
  4. #This goes first, so the normal builtins will override in some classes
  5. ## Paramerers
  6. color brightwhite "^[[:space:]]([a-z][a-z0-9_]+)"
  7. color brightgreen "\$[a-z:][a-z0-9_:]+"
  8. ## List of built in types, also catches defines
  9. color yellow "\<(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)\>"
  10. color yellow "\<(class|define|if|else|undef|inherits)\>"
  11. color red "(=|-|~|>)"
  12. ## Constants
  13. color brightblue "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
  14. ## Ruby "symbols"
  15. color magenta "([ ]|^):[0-9A-Z_]+\>"
  16. ## Regular expressions
  17. color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
  18. ## Shell command expansion is in `backticks` or like %x{this}. These are
  19. ## "double-quotish" (to use a perlism).
  20. color brightblue "`[^`]*`" "%x\{[^}]*\}"
  21. ## Strings, double-quoted
  22. color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
  23. ## Expression substitution. These go inside double-quoted strings,
  24. ## "like ${this}".
  25. color brightgreen "\$\{[^}]*\}"
  26. ## Strings, single-quoted
  27. color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
  28. ## Comments
  29. color cyan "#[^{].*$" "#$"
  30. color brightcyan "##[^{].*$" "##$"
  31. ## Some common markers
  32. color brightcyan "(XXX|TODO|FIXME|\?\?\?)"
  33. ## Trailing spaces
  34. color red "[[:space:]]+$"