From f59dd77f602a5523283161fe80d6b377c845a097 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 8 Aug 2012 19:38:27 +0200 Subject: [PATCH] add rc/asciidoc.kak for asciidoc highlighting --- src/kakrc | 1 + src/rc/asciidoc.kak | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/rc/asciidoc.kak diff --git a/src/kakrc b/src/kakrc index 9830b7ef..a33210af 100644 --- a/src/kakrc +++ b/src/kakrc @@ -3,6 +3,7 @@ hook global WinCreate .* %{ addhl number_lines } runtime rc/cpp.kak runtime rc/kakrc.kak +runtime rc/asciidoc.kak runtime rc/git.kak runtime rc/global.kak runtime rc/diff.kak diff --git a/src/rc/asciidoc.kak b/src/rc/asciidoc.kak new file mode 100644 index 00000000..4e9a55cb --- /dev/null +++ b/src/rc/asciidoc.kak @@ -0,0 +1,11 @@ +hook global BufCreate .*\.asciidoc %{ setb filetype asciidoc } + +hook global WinSetOption filetype=asciidoc %{ + addhl group asciidoc-highlight + addhl -group asciidoc-highlight regex ^[^\n]+\n={2,}\h*$ 0:blue + addhl -group asciidoc-highlight regex ^[^\n]+\n-{2,}\h*$ 0:cyan + addhl -group asciidoc-highlight regex ^\h+[-\*]\h+([^\n:]+:)?[^\n]*(\n\h+[^-\*]\S+[^\n]*)*$ 0:yellow 1:green +} + +hook global WinSetOption filetype=(?!asciidoc).* %{ rmhl asciidoc-higlight } +