diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-05-23 12:41:55 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-05-23 12:42:38 +1000 |
| commit | 9ffde03ca74ce691882c47776fe8d014792dff4c (patch) | |
| tree | a387707c02716d5c2ffa5db82eea65b83abae801 | |
| parent | a1f0bae53a3f0f138e5d0f485699178cb4222a85 (diff) | |
git.kak: support highlighting git log decorations
| -rw-r--r-- | rc/tools/git.kak | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rc/tools/git.kak b/rc/tools/git.kak index 93540d36..d99de777 100644 --- a/rc/tools/git.kak +++ b/rc/tools/git.kak @@ -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 |
