summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2023-06-30 08:42:39 +0200
committerStefan Haller <stefan@haller-berlin.de>2023-09-04 16:52:30 +0200
commit6266e196232b6dab6181ca33da90b6dff3732da1 (patch)
treed76871437d1fa8bd9bc6541e3d4dfbdbe884bab7 /docs
parentc67aa49856cf7ffaac7665237a3c3b0af40358fd (diff)
Add support for external diff commands (e.g. difftastic)
Diffstat (limited to 'docs')
-rw-r--r--docs/Custom_Pagers.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/Custom_Pagers.md b/docs/Custom_Pagers.md
index 3d596460b..cc7e84d36 100644
--- a/docs/Custom_Pagers.md
+++ b/docs/Custom_Pagers.md
@@ -62,3 +62,25 @@ git:
```
If you set `useConfig: true`, lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
+
+## Using external diff commands
+
+Some diff tools can't work as a simple pager like the ones above do, because they need access to the entire diff, so just post-processing git's diff is not enough for them. The most notable example is probably [difftastic](https://difftastic.wilfred.me.uk).
+
+These can be used in lazygit by using the `externalDiffCommand` config; in the case of difftastic, that could be
+
+```yaml
+git:
+ paging:
+ externalDiffCommand: difft --color=always
+```
+
+The `colorArg`, `pager`, and `useConfig` options are not used in this case.
+
+You can add whatever extra arguments you prefer for your difftool; for instance
+
+```yaml
+git:
+ paging:
+ externalDiffCommand: difft --color=always --display=inline --syntax-highlight=off
+```