2012-07-31 16:22:57 +04:00
|
|
|
hook global BufCreate (.*/)?(kakrc|.*.kak) %{
|
2012-06-14 17:21:22 +04:00
|
|
|
setb filetype kak
|
2012-07-31 16:22:57 +04:00
|
|
|
}
|
2012-06-14 17:21:22 +04:00
|
|
|
|
2012-07-31 16:22:57 +04:00
|
|
|
hook global WinSetOption filetype=kak %{
|
|
|
|
addhl group kak-highlight
|
2013-04-11 16:30:02 +04:00
|
|
|
addhl -group kak-highlight regex \<(hook|rmhooks|addhl|rmhl|addfilter|rmfilter|exec|eval|source|runtime|def|decl|echo|edit|set[gbw])\> 0:keyword
|
2012-09-17 21:02:08 +04:00
|
|
|
addhl -group kak-highlight regex \<(default|black|red|green|yellow|blue|magenta|cyan|white)\> 0:value
|
2012-11-20 17:14:54 +04:00
|
|
|
addhl -group kak-highlight regex (?<=\<hook)\h+((global|buffer|window)|(\S+))\h+(\S+)\h+(\H+) 2:attribute 3:error 4:identifier 5:string
|
2012-09-17 21:02:08 +04:00
|
|
|
addhl -group kak-highlight regex (?<=\<regex)\h+(\S+) 1:string
|
|
|
|
addhl -group kak-highlight regex (["'])(?:\\\1|.)*?\1 0:string
|
|
|
|
addhl -group kak-highlight regex (?<=\<set[gbw])\h+(\S+)\h+(\S+) 1:identifier 2:value
|
|
|
|
addhl -group kak-highlight regex (^|\h)\#[^\n]*\n 0:comment
|
2012-07-31 16:22:57 +04:00
|
|
|
}
|
2012-06-14 17:21:22 +04:00
|
|
|
|
2012-07-31 16:22:57 +04:00
|
|
|
hook global WinSetOption filetype=(?!kak).* %{
|
2012-06-15 01:52:47 +04:00
|
|
|
rmhl kak-highlight
|
2012-07-31 16:22:57 +04:00
|
|
|
}
|