rc: Add support for Mercurial
The script only highlights comments in commit messages, but it's a basis to improve upon if more features are needed in a later time.
This commit is contained in:
parent
8e3e5b10c1
commit
3cb159f056
26
rc/base/mercurial.kak
Normal file
26
rc/base/mercurial.kak
Normal file
|
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user