summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-09-11 21:11:27 +0800
committerMaxime Coste <mawww@kakoune.org>2017-09-11 21:11:27 +0800
commit661047795c8f76544eb63a35eea929d91a7d87fd (patch)
treed75982adcc5164317649b918dbfcdbf1fc6c0642
parent67adc4109eb2b14507d6005c157cf9114f759b31 (diff)
parent3cb159f0564c084848ffa0cbc6d9abb1ee594291 (diff)
Merge remote-tracking branch 'lenormf/mercurial-support'
-rw-r--r--rc/base/mercurial.kak26
1 files changed, 26 insertions, 0 deletions
diff --git a/rc/base/mercurial.kak b/rc/base/mercurial.kak
new file mode 100644
index 00000000..cd03b011
--- /dev/null
+++ b/rc/base/mercurial.kak
@@ -0,0 +1,26 @@
+# https://www.mercurial-scm.org/
+# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
+
+# Faces
+# ‾‾‾‾‾
+
+face MercurialCommitComment cyan
+
+# Detection
+# ‾‾‾‾‾‾‾‾‾
+
+hook global BufCreate .*hg-editor-\w+\.txt$ %{
+ set buffer filetype hg-commit
+}
+
+hook -group hg-commit-highlight global WinSetOption filetype=(?!hg-commit).* %{
+ remove-highlighter hg-commit-highlight
+}
+
+# Highlighters
+# ‾‾‾‾‾‾‾‾‾‾‾‾
+
+hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
+ add-highlighter group hg-commit-highlight
+ add-highlighter -group hg-commit-highlight regex '^HG:[^\n]*' 0:MercurialCommitComment
+}