filetype/mercurial: Improve highlighting of Mercurial commit messages

This highlights important commit metadata when editing mercurial
commit messages such as the user, the branch, bookmark etc. with
reasonable colours.
This commit is contained in:
Nico Sonack 2023-11-16 11:33:07 +01:00
parent f19546a2bb
commit befad73a30

View File

@ -27,7 +27,11 @@ set-face global MercurialCommitComment cyan
# Highlighters # Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾ # ‾‾‾‾‾‾‾‾‾‾‾‾
add-highlighter shared/hg-commit group add-highlighter shared/hg-commit regions
add-highlighter shared/hg-commit/ regex '^HG:[^\n]*' 0:comment 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
} }