jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.68k stars 1.87k forks source link

lazygit not using delta"s colors #3096

Open xeros-and-ones opened 1 year ago

xeros-and-ones commented 1 year ago

Lazygit suddenly not respecting or using delta's colours

this is how delta looks like in the terminal as a pager: Screenshot_20231028_092740

And this is how delta looks in lazygit: Screenshot_20231028_092838

commit=v0.40.2, build source=binaryRelease, version=0.40.2, os=linux, arch=amd64, git version=2.42.0

Here's My config: lazygit ▼▼▼▼

# yaml-language-server: $schema=https://json.schemastore.org/lazygit.json
gui:
  expandFocusedSidePanel: true
  nerdFontsVersion: '3'
  border: 'rounded'
  theme:
    selectedLineBgColor:
      - black
      - bold
    selectedRangeBgColor:
      - green
      - bold
git:
  paging:
    colorArg: always
    pager: delta --dark --paging=never

git ▼▼▼▼

[core]
    editor = nvim
    pager = delta
[interactive]
    diffFilter = delta --color-only
[delta]
    navigate = true    # use n and N to move between diff sections
    light = false      # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
    side-by-side = false
    line-numbers = true
    syntax-theme = gruvbox-dark
[merge]
    conflictstyle = diff3
[diff]
    colorMoved = default
HoffsMH commented 6 months ago

Did you ever resolve this?

xyven1 commented 6 months ago

Also seeing this issue, using the Visual Studio Dark+ theme.

V4G4X commented 2 months ago

I have this issue as well.

Delta config:

git:
  log:
    showGraph: always
    showWholeGraph: false
  paging:
    pager: delta --dark --paging=never
gui:
  nerdFontsVersion: '3'
  showFileTree: false

Version:

❯ lazygit --version
commit=, build date=, build source=nix, version=0.43.1, os=darwin, arch=arm64, git version=2.45.2
❯ delta --version
delta 0.18.0
avimehenwal commented 4 weeks ago

I am experiencing the same issues when using delta with lazygit. Delta seems to work fine on CLI, colors seems to mismatch when using it with lazygit

diego898 commented 3 weeks ago

Same here with:

❯ lazygit --version
commit=, build date=, build source=homebrew, version=0.44.1, os=darwin, arch=arm64, git version=2.47.0
❯ delta --version
delta 0.18.2
xeros-and-ones commented 3 weeks ago

it seems I'm not the only one having this issue.i removed delta as lazygit's pager and it works fine when i need it. I'm now using magit which funny enough it has the same issue with delta. but it has a good diff so I'm using that

anvandaren commented 2 weeks ago

Same here, with the same versions of lazygit and delta as @diego898. Using gnome terminal with Tango theme if that makes any difference.

anvandaren commented 2 weeks ago

Turns out the culprit for me was byobu. Discovered that the colors were correct outside byobu.

Followed this instruction from Delta and now it works: https://dandavison.github.io/delta/tips-and-tricks/using-delta-with-tmux.html

V4G4X commented 2 weeks ago

@anvandaren You're right I noticed this as well.

The colours are incorrect only inside tmux.

Just that adding set -ga terminal-overrides ",*-256color:Tc" in my .tmux.conf didn't help.

Running the colour test script returns this (I'm not sure if it's supposed to be correct) image