Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] git diff is not shown using delta as pager in lazygit, but works fine in command line in terminal #2337

Closed
hopezh opened this issue Dec 29, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@hopezh
Copy link

hopezh commented Dec 29, 2022

Describe the bug
As shown below, I can see the diff of a local git repo using git diff with delta as the pager in the terminal.

However, lazygit doesn't show this diff in the "delta way" although I have specified delta as its pager.

My .gitconfig and config.yml for lazygit are shown below.

Strangely, the same configuration works fine in Mac OS with git diff highlighted with delta in both command-line and lazygit...

May I ask what important steps I may have missed here?

Thanks.

To Reproduce
(As described above)

Expected behavior
(As described above)

Screenshots
running git diff in command-line:
2022-12-28-15-13-49

git diff as shown in lazygit:
2022-12-28-15-10-31

My git config file ~/.gitconfig

[user]
	name = USER
	email = USER@gmail.com
[core]
	pager = delta
[interactive]
    diffFilter = delta --color-only --features=interactive
[delta]
    navigate = true    
    light = false      
    side-by-side = true  
    line-numbers = true   
    features = decorations	 
[delta "interactive"]
    keep-plus-minus-markers = true
[delta "decorations"]
    commit-decoration-style = blue ol
    commit-style = raw
    file-style = omit
    hunk-header-decoration-style = blue box
    hunk-header-file-style = red
    hunk-header-line-number-style = "#067a00"
    hunk-header-style = file line-number syntax
[merge]
    conflictstyle = diff3
[diff]
    colorMoved = default

My lazygit config file ~/AppData/Roaming/lazygit/config.yml
(I was directed to ~/AppData/Roaming when I pasted %APPDATA% in File Explorer.)

git:
  paging:
    colorArg: never
    pager: delta --dark --paging=never 
    # pager: ydiff -p cat -s --wrap --width={{columnWidth}}   
    useConfig: false

Version info:
Run lazygit --version and paste the result here:
commit=d1a8b05401ccda1e52215203139a252eb3be3b79, build date=2022-11-14T09:22:31Z, build source=binaryRelease, version=0.36.0, os=windows, arch=amd64, git version=2.34.1.windows.1

Run git --version and paste the result here
git version 2.34.1.windows.1

Additional context
OS: Windows 11 Pro, 64bit, 22H2, build 22621.963

Reference read
#2300

Note: please try updating to the latest version or manually building the latest master to see if the issue still occurs.

@hopezh hopezh added the bug Something isn't working label Dec 29, 2022
@aropele
Copy link

aropele commented Jan 3, 2023

Same probelm here, in the docs its written that custom pagers are not supported on Windows, however I think it would be quite usefull since delta allows quite a boost in productivity.

@Ryooooooga
Copy link
Contributor

duplicated of #1453

@mvolkmann
Copy link

I'm begging for a solution to this one. I don't think I can use Lazygit if I can't get it to display side-by-side diffs. Has anyone successfully configured Lazygit to do this?

@hasansujon786
Copy link

Having same issue :(

@mvolkmann
Copy link

I FINALLY got side-by-side diffs to work! See my writeup at https://mvolkmann.github.io/blog/topics/#/blog/neovim/. Click "16. Lazygit" in the table of contents at the top. My instructions are specific to macOS.

@hopezh
Copy link
Author

hopezh commented May 10, 2023

I FINALLY got side-by-side diffs to work! See my writeup at https://mvolkmann.github.io/blog/topics/#/blog/neovim/. Click "16. Lazygit" in the table of contents at the top. My instructions are specific to macOS.

Thanks. Unfortunately, the issue I reported, and echoed by others, are for Windows system, specifically... There's no solution, so far, as it seems...

@CharlesChiuGit
Copy link

CharlesChiuGit commented May 18, 2023

My same config works on linux but not windows too. In linux or wsl, I can utilize delta as git parser perfectly.

@pidgeon777
Copy link

I also have the same issue, running delta and lazygit on Windows 10 x64. Any bugfix @jesseduffield ?

@adrivn
Copy link

adrivn commented Jun 7, 2023

Same here. Using delta as custom pager works as intended in the terminal but does not when using/invoking a lazygit instance.

Using Windows 10 x64 as well.

@jesseduffield
Copy link
Owner

Closing as a duplicate of #2715

Believe me, I want windows to work just as well as osx/linux but we have a dependency with a windows-compatibility PR that's stuck in limbo so there's not much we can do until that's merged

@hopezh
Copy link
Author

hopezh commented Jun 8, 2023

Understood. This is not a critical issue. I'm learning and enjoying lazygit everyday. Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants