mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-20 01:41:40 +03:00
d49555fc75
That means we can now have highlighters active at global, buffer, and window scope. The add-highlighter and remove-highlighter syntax changed to take the parent path (scope/group/...) as a mandatory argument, superseeding the previous -group switch.
27 lines
723 B
Plaintext
27 lines
723 B
Plaintext
# 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 window/hg-commit-highlight
|
|
}
|
|
|
|
# Highlighters
|
|
# ‾‾‾‾‾‾‾‾‾‾‾‾
|
|
|
|
hook -group hg-commit-highlight global WinSetOption filetype=hg-commit %{
|
|
add-highlighter window group hg-commit-highlight
|
|
add-highlighter window/hg-commit-highlight regex '^HG:[^\n]*' 0:MercurialCommitComment
|
|
}
|