From 603b80724200b31a35ac6bed6f9e160b922e0f40 Mon Sep 17 00:00:00 2001 From: Chiel ten Brinke Date: Thu, 13 Jan 2022 11:04:53 +0100 Subject: Contribute zebra features --- manual/src/color-moved-support.md | 7 +++++++ themes.gitconfig | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/manual/src/color-moved-support.md b/manual/src/color-moved-support.md index 5f4c42fc..cd301221 100644 --- a/manual/src/color-moved-support.md +++ b/manual/src/color-moved-support.md @@ -20,6 +20,13 @@ This feature allows all of git's color-moved options to be rendered using delta map-styles = bold purple => syntax magenta, bold cyan => syntax blue ``` +There is a pair of features provided in [themes.config](https://github.com/chtenb/delta/blob/master/themes.gitconfig) called `zebra-dark` and `zebra-light` which utilise the moved colors by displaying them as a faint background color on the affected lines while keeping syntax highlighting as the foreground color. You can enable one of these features by stacking it upon the theme you are using. + + + + +
imageimage
+ It is also possible to reference other styles. ```gitconfig diff --git a/themes.gitconfig b/themes.gitconfig index 96406aff..c0c9d7a8 100644 --- a/themes.gitconfig +++ b/themes.gitconfig @@ -270,3 +270,29 @@ minus-emph-style = syntax bold red plus-emph-style = syntax bold green whitespace-error-style = purple bold + +[delta "zebra-dark"] + minus-style = syntax "#330f0f" + minus-emph-style = syntax "#4f1917" + plus-style = syntax "#0e2f19" + plus-emph-style = syntax "#174525" + map-styles = \ + bold purple => syntax "#330f29", \ + bold blue => syntax "#271344", \ + bold cyan => syntax "#0d3531", \ + bold yellow => syntax "#222f14" + zero-style = syntax + whitespace-error-style = "#aaaaaa" + +[delta "zebra-light"] + minus-style = syntax "#fbdada" + minus-emph-style = syntax "#f6b6b6" + plus-style = syntax "#d6ffd6" + plus-emph-style = syntax "#adffad" + map-styles = \ + bold purple => syntax "#feecf7", \ + bold blue => syntax "#e5dff6", \ + bold cyan => syntax "#d8fdf6", \ + bold yellow => syntax "#f4ffe0" + zero-style = syntax + whitespace-error-style = "#aaaaaa" -- cgit v1.2.3