1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-25 10:32:19 +03:00

Merge remote-tracking branch 'somasis/master'

This commit is contained in:
Maxime Coste 2015-08-11 13:33:06 +01:00
commit 2a72ca6f63

53
rc/exherbo.kak Normal file
View File

@ -0,0 +1,53 @@
## Repository metadata files
hook global BufCreate .*/metadata/.*\.conf %{
set buffer filetype exheres-0-metadata
}
## News items
hook global BufCreate .*/metadata/news/.*/.*\.txt %{
set buffer filetype glep42
}
## exheres-0, exlib
hook global BufCreate .*\.(exheres-0|exlib) %{
set buffer filetype sh
}
# Paludis configurations
hook global BufCreate /etc/paludis/.*\.conf %{
set buffer filetype paludis-conf
}
# Highlighters
## exheres-0 Repository metadata files
addhl -group / group exheres-0-metadata
addhl -group /exheres-0-metadata regex ^#.*?$ 0:comment
addhl -group /exheres-0-metadata regex ^(?:[\s\t]+)?(\*)?(summary|description|homepage|owner|status|preferred_(?:gid|uid)|gecos|shell|(?:extra|primary)_groups|masters|author|date|token|description)(?:[\s\t]+)?=(?:[\s\t]+)?(.+?)?$ 1:type 2:attribute 3:string
addhl -group /exheres-0-metadata regex ^(?:[\s\t]+)?[\S]+[\s\t]+=[\s\t]+\[.+?[\s\t]+\] 0:string
addhl -group /exheres-0-metadata regex ^(?:[\s\t]+)?(\S+)\s\[\[$ 0:type
addhl -group /exheres-0-metadata regex ^(?:[\s\t]+)?\]\]$ 0:type
hook global WinSetOption filetype=exheres-0-metadata %{ addhl ref exheres-0-metadata }
hook global WinSetOption filetype=(?!exheres-0-metadata).* %{ rmhl exheres-0-metadata }
## Paludis configurations
addhl -group / group paludis-conf
addhl -group /paludis-conf regex [\s\t]+(\S+(?:[\s\t]+))*$ 0:attribute
addhl -group /paludis-conf regex [\s\t]+(-(\S+(?:[\s\t]+))) 0:keyword 1:red
addhl -group /paludis-conf regex [\s\t]+(\S+:(?:[\s\t]+)) 0:keyword
addhl -group /paludis-conf regex (?::)(?:[\s\t]+)(.*?$) 1:attribute
addhl -group /paludis-conf regex [\s\t]+(\S+\=)(.+?[\s\t]) 1:attribute 2:value
addhl -group /paludis-conf regex ^(\S+/\S+) 0:type
addhl -group /paludis-conf regex ^#.*?$ 0:comment
hook global WinSetOption filetype=paludis-conf %{ addhl ref paludis-conf }
hook global WinSetOption filetype=(?!paludis-conf).* %{ rmhl paludis-conf }
## News items (GLEP42)
addhl -group / group glep42
addhl -group /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
addhl -group /glep42 regex <[^@>]+@.*?> 0:string
addhl -group /glep42 regex ^>.*?$ 0:comment
hook global WinSetOption filetype=glep42 %{ addhl ref glep42 }
hook global WinSetOption filetype=(?!glep42).* %{ rmhl glep42 }