2017-09-08 13:44:55 +02:00
|
|
|
# https://www.mercurial-scm.org/
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
|
|
|
# Detection
|
|
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2023-11-16 11:30:07 +01:00
|
|
|
hook global BufCreate .*hg-editor-.*\.txt$ %{
|
2017-11-03 08:34:41 +01:00
|
|
|
set-option buffer filetype hg-commit
|
2017-09-08 13:44:55 +02:00
|
|
|
}
|
|
|
|
|
2019-04-12 00:54:58 +02:00
|
|
|
hook global WinSetOption filetype=hg-commit %{
|
2019-03-13 19:15:59 +01:00
|
|
|
require-module hg-commit
|
|
|
|
}
|
|
|
|
|
2019-04-12 00:54:58 +02:00
|
|
|
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 }
|
|
|
|
}
|
|
|
|
|
2019-03-13 19:15:59 +01:00
|
|
|
provide-module hg-commit %{
|
|
|
|
|
|
|
|
# Faces
|
|
|
|
# ‾‾‾‾‾
|
|
|
|
|
|
|
|
set-face global MercurialCommitComment cyan
|
|
|
|
|
2017-09-08 13:44:55 +02:00
|
|
|
# Highlighters
|
|
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
|
2023-11-16 11:33:07 +01:00
|
|
|
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
|
2019-03-13 19:15:59 +01:00
|
|
|
|
|
|
|
}
|