delta
delta copied to clipboard
🐛 Dark theme doesn't seem to be working
trafficstars
- [ ] Please include the raw text output from git, so that we can reproduce the problem.
❯ git --no-pager blame smallestmultiple/src/main.rs
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 1) // Done using formula a * b = lcm(a*b)*gcd(a*b)
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 2)
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 3) fn gcd(mut a: i64, mut b: i64) -> i64 {
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 4) while b != 0 {
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 5) let temp = b;
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 6) b = a % b;
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 7) a = temp;
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 8) }
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 9) a
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 10) }
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 11)
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 12) fn main() {
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 13) let mut lcm: i64 = 1;
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 14) for i in 1..=20 {
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 15) lcm = lcm * i / gcd(lcm, i);
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 16) }
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 17) println!("{}", lcm);
47d46703 (Rahil Prakash 2024-05-21 00:15:37 +0530 18) }
Delta doesn't seem to be respecting the manually set theme. I've tried this both on tmux and base kitty. gitconfig for reference
[user]
name = Rahil Prakash
email = [email protected]
[init]
defaultBranch = main
[pull]
rebase = false
[core]
editor = nvim
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
dark = true
navigate = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
Oh wait, I figured it out. The BAT_THEME variable takes priority over that of dark = true, and the GitHub theme, which appears dark in bat, seems to be light in delta. Is this intended behaviour? I've worked around it by setting the theme in the bat config for now.
I also ran into this issue. Typically cli args take precedence over env var config settings so this should be fixed IMO