f19546a2bb
The regex for detecting Mercurial's file types was too strict and didn't catch commit messages. Relax it to make it detect the commit files properly.
34 lines
834 B
Plaintext
34 lines
834 B
Plaintext
# https://www.mercurial-scm.org/
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
# Detection
|
|
# ‾‾‾‾‾‾‾‾‾
|
|
|
|
hook global BufCreate .*hg-editor-.*\.txt$ %{
|
|
set-option buffer filetype hg-commit
|
|
}
|
|
|
|
hook global WinSetOption filetype=hg-commit %{
|
|
require-module hg-commit
|
|
}
|
|
|
|
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 }
|
|
}
|
|
|
|
provide-module hg-commit %{
|
|
|
|
# Faces
|
|
# ‾‾‾‾‾
|
|
|
|
set-face global MercurialCommitComment cyan
|
|
|
|
# Highlighters
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
add-highlighter shared/hg-commit group
|
|
add-highlighter shared/hg-commit/ regex '^HG:[^\n]*' 0:comment
|
|
|
|
}
|