kakoune/rc/base/mercurial.kak
Maxime Coste 57baad4afd Make FaceRegistry scoped
set-face now takes a scope argument, and faces can be overridden on
a buffer or window basis.

colorscheme apply on global scope, which should be good enough for
now.

Fixes #1411
2018-04-07 16:27:50 +10:00

27 lines
741 B
Plaintext

# https://www.mercurial-scm.org/
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Faces
# ‾‾‾‾‾
set-face global MercurialCommitComment cyan
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*hg-editor-\w+\.txt$ %{
set-option buffer filetype hg-commit
}
hook -group hg-commit-highlight global WinSetOption filetype=(?!hg-commit).* %{
remove-highlighter window/hg-commit-highlight
}
# 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:MercurialCommitComment
}