blob: 255b02be12c74adfd0a2e309804a1ca1f526887c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# https://www.mercurial-scm.org/
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
# Detection
# ‾‾‾‾‾‾‾‾‾
hook global BufCreate .*hg-editor-.*\.txt$ %{
set-option buffer filetype hg-commit
}
hook global WinSetOption filetype=hg-commit %{
require-module hg-commit
}
hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
add-highlighter window/hg-commit ref hg-commit
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/hg-commit-highlight }
}
provide-module hg-commit %{
# Faces
# ‾‾‾‾‾
set-face global MercurialCommitComment cyan
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/hg-commit regions
add-highlighter shared/hg-commit/comments region ^HG:\ $ group
add-highlighter shared/hg-commit/comments/ fill comment
add-highlighter shared/hg-commit/comments/ regex \
"\b(?:(changed)|(removed)|(added)|(bookmark)|(branch)|(user:)) ([^\n]*)$" \
1:yellow 2:red 3:green 4:blue 5:magenta 6:white
}
|