kakoune/rc/filetype/mercurial.kak
Alex Leferry 2 c0dccdd90d Add categories in rc/
Closes #2783
2019-03-21 01:06:16 +01:00

19 lines
628 B
Plaintext

# https://www.mercurial-scm.org/
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*hg-editor-\w+\.txt$ %{
set-option buffer filetype hg-commit
}
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
add-highlighter window/ group hg-commit-highlight
add-highlighter window/hg-commit-highlight regex '^HG:[^\n]*' 0:comment
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hg-commit-highlight }
}