diff --git a/src/kakrc b/src/kakrc index 9830b7ef9..a33210af8 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 000000000..4e9a55cbf --- /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 } +