summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-12-02 11:05:27 +1100
committerMaxime Coste <mawww@kakoune.org>2023-12-02 11:05:27 +1100
commit84ecd41da1368b4f9f20b08dfb5ced57241ec3f3 (patch)
treedb94d8ecc6cb41e38e7fa7b20e89837483a161de
parent94d58b2e078b0e27052ab6e7496891212b3c0e55 (diff)
parentbefad73a30b602938a88bb371da387baa3258076 (diff)
Merge remote-tracking branch 'herrhotzenplotz/feat/hg-highlight-keywords'
-rw-r--r--rc/filetype/mercurial.kak10
1 files changed, 7 insertions, 3 deletions
diff --git a/rc/filetype/mercurial.kak b/rc/filetype/mercurial.kak
index f21cd202..255b02be 100644
--- a/rc/filetype/mercurial.kak
+++ b/rc/filetype/mercurial.kak
@@ -4,7 +4,7 @@
# Detection
# ‾‾‾‾‾‾‾‾‾
-hook global BufCreate .*hg-editor-\w+\.txt$ %{
+hook global BufCreate .*hg-editor-.*\.txt$ %{
set-option buffer filetype hg-commit
}
@@ -27,7 +27,11 @@ set-face global MercurialCommitComment cyan
# Highlighters
# ‾‾‾‾‾‾‾‾‾‾‾‾
-add-highlighter shared/hg-commit group
-add-highlighter shared/hg-commit/ regex '^HG:[^\n]*' 0:comment
+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
}