From 3c6c50e4f5a515f17240a8205e2e6941809dcdff Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Fri, 22 Mar 2024 07:34:34 -0400 Subject: Add documentation help regarding autodetection and light/dark settings --- README.md | 4 ++++ manual/src/choosing-colors-styles.md | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index b880542b..d2bff458 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ [delta] navigate = true # use n and N to move between diff sections + # delta detects terminal colors automatically; set one of these to disable auto-detection + # dark = true + # light = true + [merge] conflictstyle = diff3 diff --git a/manual/src/choosing-colors-styles.md b/manual/src/choosing-colors-styles.md index 37c95635..2b053d6b 100644 --- a/manual/src/choosing-colors-styles.md +++ b/manual/src/choosing-colors-styles.md @@ -1,5 +1,14 @@ # Choosing colors (styles) +Delta detects your terminal background color automatically and chooses appropriate default colors. +To override automatic detection use `dark` or `light`, e.g. + +```gitconfig +[delta] + dark = true +``` +This is necessary when running delta in some contexts such as `lazygit` or `zellij`. + All options that have a name like `--*-style` work in the same way. It is very similar to how colors/styles are specified in a gitconfig file: -- cgit v1.2.3