git.kak: support highlighting git log decorations
This commit is contained in:
parent
a1f0bae53a
commit
9ffde03ca7
|
@ -3,14 +3,13 @@ declare-option -docstring "name of the client in which documentation is to be di
|
|||
|
||||
hook -group git-log-highlight global WinSetOption filetype=git-log %{
|
||||
add-highlighter window/git-log group
|
||||
add-highlighter window/git-log/ regex '^(commit) ([0-9a-f]+)$' 1:keyword 2:meta
|
||||
add-highlighter window/git-log/ regex '^(commit) ([0-9a-f]+)( [^\n]+)?$' 1:keyword 2:meta 3:comment
|
||||
add-highlighter window/git-log/ regex '^([a-zA-Z_-]+:) (.*?)$' 1:variable 2:value
|
||||
add-highlighter window/git-log/ ref diff # highlight potential diffs from the -p option
|
||||
|
||||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/git-log }
|
||||
}
|
||||
|
||||
|
||||
hook -group git-status-highlight global WinSetOption filetype=git-status %{
|
||||
add-highlighter window/git-status group
|
||||
add-highlighter window/git-status/ regex '^\h+(?:((?:both )?modified:)|(added:|new file:)|(deleted(?: by \w+)?:)|(renamed:)|(copied:))(?:.*?)$' 1:yellow 2:green 3:red 4:cyan 5:blue 6:magenta
|
||||
|
@ -18,7 +17,6 @@ hook -group git-status-highlight global WinSetOption filetype=git-status %{
|
|||
hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/git-status }
|
||||
}
|
||||
|
||||
|
||||
declare-option -hidden line-specs git_blame_flags
|
||||
declare-option -hidden line-specs git_diff_flags
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user