summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChiel ten Brinke <ctenbrinke@gmail.com>2022-01-13 11:04:53 +0100
committerDan Davison <dandavison7@gmail.com>2022-01-25 12:04:58 -0500
commit603b80724200b31a35ac6bed6f9e160b922e0f40 (patch)
tree34ff8ffd90d05ff92fd28aa98102f04cd18fb947
parent9436b0541813f7358627fe0692c98c0a9839fa52 (diff)
Contribute zebra features
-rw-r--r--manual/src/color-moved-support.md7
-rw-r--r--themes.gitconfig26
2 files changed, 33 insertions, 0 deletions
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.
+
+<table><tr>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756321-d9e885fe-206c-4e08-8c40-e0ed5969b04a.png" alt="image" /></td>
+ <td><img width=600px src="https://user-images.githubusercontent.com/1030961/149756332-ce8a4e2a-7487-4880-a151-761872657a28.png" alt="image" /></td>
+</tr></table>
+
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"