exherbo.kak (8256B)
1 ## Repository metadata files 2 hook global BufCreate .*/metadata/mirrors\.conf %{ set-option buffer filetype paludis-mirrors-conf } 3 hook global BufCreate .*/metadata/licence_groups.conf %{ set-option buffer filetype exheres-0-licence-groups } 4 hook global BufCreate .*/metadata/options/descriptions/.*\.conf %{ set-option buffer filetype exheres-0-licence-groups } 5 hook global BufCreate .*/metadata/.*\.conf %{ set-option buffer filetype exheres-0-metadata } 6 7 ## News items 8 hook global BufCreate .*/metadata/news/.*/.*\.txt %{ set-option buffer filetype glep42 } 9 10 ## exheres-0, exlib 11 hook global BufCreate .*\.(exheres-0|exlib) %{ set-option buffer filetype sh } 12 13 # Paludis configurations 14 hook global BufCreate .*/etc/paludis(-.*)?/bashrc %{ set-option buffer filetype sh } 15 hook global BufCreate .*/etc/paludis(-.*)?/general(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-key-value-conf } 16 hook global BufCreate .*/etc/paludis(-.*)?/licences(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-options-conf } 17 hook global BufCreate .*/etc/paludis(-.*)?/mirrors(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-mirrors-conf } 18 hook global BufCreate .*/etc/paludis(-.*)?/options(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-options-conf } 19 hook global BufCreate .*/etc/paludis(-.*)?/output(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-key-value-conf } 20 hook global BufCreate .*/etc/paludis(-.*)?/package_(unmask|mask)(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-specs-conf } 21 hook global BufCreate .*/etc/paludis(-.*)?/platforms(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-specs-conf } 22 hook global BufCreate .*/etc/paludis(-.*)?/repositories/.*\.conf %{ set-option buffer filetype paludis-key-value-conf } 23 hook global BufCreate .*/etc/paludis(-.*)?/repository\.template %{ set-option buffer filetype paludis-key-value-conf } 24 hook global BufCreate .*/etc/paludis(-.*)?/repository_defaults\.conf %{ set-option buffer filetype paludis-key-value-conf } 25 hook global BufCreate .*/etc/paludis(-.*)?/specpath\.conf %{ set-option buffer filetype paludis-key-value-conf } 26 hook global BufCreate .*/etc/paludis(-.*)?/suggestions(\.conf.d/.*.conf|\.conf) %{ set-option buffer filetype paludis-specs-conf } 27 28 hook global WinSetOption filetype=exheres-0-(metadata|options-descriptions|licence-groups) %{ 29 require-module exheres 30 } 31 32 hook -group exheres-0-metadata-highlight global WinSetOption filetype=exheres-0-metadata %{ 33 add-highlighter window/exheres-0-metadata ref exheres-0-metadata 34 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-metadata } 35 } 36 37 hook -group exheres-0-options-descriptions-highlight global WinSetOption filetype=exheres-0-options-descriptions %{ 38 add-highlighter window/exheres-0-options-descriptions ref exheres-0-options-descriptions 39 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-options-descriptions } 40 } 41 42 hook -group exheres-0-licence-groups-highlight global WinSetOption filetype=exheres-0-licence-groups %{ 43 add-highlighter window/exheres-0-licence-groups ref exheres-0-licence-groups 44 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/exheres-0-licence-groups } 45 } 46 47 provide-module exheres %{ 48 # Highlighters 49 ## exheres-0 Repository metadata files 50 add-highlighter shared/exheres-0-metadata group 51 add-highlighter shared/exheres-0-metadata/ regex ^#.*?$ 0:comment 52 add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?(\*)?(\S+)(?:[\s\t]+)?=(?:[\s\t]+)?(.+?)?$ 1:type 2:attribute 3:string 53 add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?[\S]+[\s\t]+=[\s\t]+\[.+?[\s\t]+\] 0:string 54 add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?(\S+)\s\[\[$ 0:type 55 add-highlighter shared/exheres-0-metadata/ regex ^(?:[\s\t]+)?\]\]$ 0:type 56 57 ## exheres-0 options descriptions 58 add-highlighter shared/exheres-0-options-descriptions group 59 add-highlighter shared/exheres-0-options-descriptions/ regex ^#.*?$ 0:comment 60 add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?[\S]+[\s\t]+-[\s\t]+\[.+?[\s\t]+\] 0:string 61 add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?(\S+)\s\[\[$ 0:type 62 add-highlighter shared/exheres-0-options-descriptions/ regex ^(?:[\s\t]+)?\]\]$ 0:type 63 64 ## metadata/licence_groups.conf 65 add-highlighter shared/exheres-0-licence-groups group 66 add-highlighter shared/exheres-0-licence-groups/ regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute 67 add-highlighter shared/exheres-0-licence-groups/ regex ^(\S+) 0:type 68 add-highlighter shared/exheres-0-licence-groups/ regex ^#.*?$ 0:comment 69 } 70 71 hook global WinSetOption filetype=paludis-(key-value|options|mirrors|specs)-conf %{ 72 require-module paludis 73 } 74 75 hook -group paludis-options-conf-highlight global WinSetOption filetype=paludis-options-conf %{ 76 add-highlighter window/paludis-options-conf ref paludis-options-conf 77 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-options-conf } 78 } 79 80 hook -group paludis-key-value-conf-highlight global WinSetOption filetype=paludis-key-value-conf %{ 81 add-highlighter window/paludis-key-value-conf ref paludis-key-value-conf 82 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-key-value-conf } 83 } 84 85 hook -group paludis-mirrors-conf-highlight global WinSetOption filetype=paludis-mirrors-conf %{ 86 add-highlighter window/paludis-mirrors-conf ref paludis-mirrors-conf 87 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-mirrors-conf } 88 } 89 90 hook -group paludis-specs-conf-highlight global WinSetOption filetype=paludis-specs-conf %{ 91 add-highlighter window/paludis-specs-conf ref paludis-specs-conf 92 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/paludis-specs-conf } 93 } 94 provide-module paludis %{ 95 ## Paludis configurations 96 ### options.conf 97 add-highlighter shared/paludis-options-conf group 98 add-highlighter shared/paludis-options-conf/ regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute 99 add-highlighter shared/paludis-options-conf/ regex (?::)(?:[\s\t]+)(.*?$) 1:attribute 100 add-highlighter shared/paludis-options-conf/ regex [\s\t]+(\S+=)(\S+) 1:attribute 2:value 101 add-highlighter shared/paludis-options-conf/ regex [\s\t](\S+:) 0:keyword 102 add-highlighter shared/paludis-options-conf/ regex [\s\t](-\S+)(.*?) 1:red 103 add-highlighter shared/paludis-options-conf/ regex ^(\S+/\S+) 0:type 104 add-highlighter shared/paludis-options-conf/ regex ^#.*?$ 0:comment 105 106 ## general.conf, repository.template 107 add-highlighter shared/paludis-key-value-conf group 108 add-highlighter shared/paludis-key-value-conf/ regex ^[\s\t]?(\S+)[\s\t+]=[\s\t+](.*?)$ 1:attribute 2:value 109 add-highlighter shared/paludis-key-value-conf/ regex ^#.*?$ 0:comment 110 111 ## mirrors.conf 112 add-highlighter shared/paludis-mirrors-conf group 113 add-highlighter shared/paludis-mirrors-conf/ regex ^[\s\t+]?(\S+)[\s\t+](.*?)$ 1:type 2:value 114 add-highlighter shared/paludis-mirrors-conf/ regex ^#.*?$ 0:comment 115 116 ## package_(unmask|mask).conf, platforms.conf 117 add-highlighter shared/paludis-specs-conf group 118 add-highlighter shared/paludis-specs-conf/ regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute 119 add-highlighter shared/paludis-specs-conf/ regex ^(\S+/\S+) 0:type 120 add-highlighter shared/paludis-specs-conf/ regex ^#.*?$ 0:comment 121 } 122 123 hook global WinSetOption filetype=glep42 %{ 124 require-module glep42 125 } 126 127 hook -group glep42-highlight global WinSetOption filetype=glep42 %{ 128 add-highlighter window/glep42 ref glep42 129 hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/glep42 } 130 } 131 132 provide-module glep42 %{ 133 ## News items (GLEP42) 134 add-highlighter shared/glep42 group 135 add-highlighter shared/glep42/ regex ^(Title|Author|Translator|Content-Type|Posted|Revision|News-Item-Format|Display-If-Installed|Display-If-Keyword|Display-If-Profile):(\N*(?:\n\h+\N+)*)$ 1:keyword 2:attribute 136 add-highlighter shared/glep42/ regex <[^@>]+@.*?> 0:string 137 add-highlighter shared/glep42/ regex ^>.*?$ 0:comment 138 }