mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
fef0277998
* core: set of tools to work on kakoune source code * base: very common languages and tools * extra: less common languages and tools
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
# http://asciidoc.org/
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
# Detection
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
hook global BufCreate .*\.asciidoc %{ set buffer filetype asciidoc }
|
|
|
|
# Highlighters
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
addhl -group / group asciidoc
|
|
|
|
addhl -group /asciidoc regex (\A|\n\n)[^\n]+\n={2,}\h*\n\h*$ 0:title
|
|
addhl -group /asciidoc regex (\A|\n\n)[^\n]+\n-{2,}\h*\n\h*$ 0:header
|
|
addhl -group /asciidoc regex (\A|\n\n)[^\n]+\n~{2,}\h*\n\h*$ 0:header
|
|
addhl -group /asciidoc regex (\A|\n\n)[^\n]+\n\^{2,}\h*\n\h*$ 0:header
|
|
addhl -group /asciidoc regex ^\h+([-\*])\h+[^\n]*(\n\h+[^-\*]\S+[^\n]*)*$ 0:list 1:bullet
|
|
addhl -group /asciidoc regex ^([-=~]+)\n[^\n\h].*?\n\1$ 0:block
|
|
addhl -group /asciidoc regex (?<!\w)(?:\+[^\n]+?\+|`[^\n]+?`)(?!\w) 0:mono
|
|
addhl -group /asciidoc regex (?<!\w)_[^\n]+?_(?!\w) 0:italic
|
|
addhl -group /asciidoc regex (?<!\w)\*[^\n]+?\*(?!\w) 0:bold
|
|
addhl -group /asciidoc regex ^:[-\w]+: 0:meta
|
|
|
|
# Commands
|
|
# ‾‾‾‾‾‾‾‾
|
|
|
|
# Initialization
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
#
|
|
hook global WinSetOption filetype=asciidoc %{ addhl ref asciidoc }
|
|
hook global WinSetOption filetype=(?!asciidoc).* %{ rmhl asciidoc }
|