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

Custom Pager support for windows #1453

Open
bin101 opened this issue Aug 25, 2021 · 22 comments
Open

Custom Pager support for windows #1453

bin101 opened this issue Aug 25, 2021 · 22 comments
Labels
blocked enhancement New feature or request

Comments

@bin101
Copy link
Contributor

bin101 commented Aug 25, 2021

Is your feature request related to a problem? Please describe.
In my opinion the default pager is very confusing. I really like to use diff-so-fancy or something similar.

Additional context
The custom pager docs are mentioning that you are using a package which has no windows support. Could you (@jesseduffield) clarify which package this is? Maybe there is an alternative in the meantime?

@bin101 bin101 added the enhancement New feature or request label Aug 25, 2021
@bin101
Copy link
Contributor Author

bin101 commented Aug 25, 2021

This package seems to be PTY, correct?

There seems to be an alternative named ConPTY for windows since 2018:
https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/

And also a go implementation:
https://github.com/ActiveState/termtest/tree/master/conpty

@jesseduffield
Copy link
Owner

Interestingly, we use creack/pty and on that repo there's a PR that appears to be almost across the line which supports conpty: creack/pty#109. So I think we can wait for that to merge and then bump the dependency and hopefully it won't take too much to hook things up (we'd need to update pkg/gui/pty_windows.go or potentially delete that file and have everything go through pkg/gui/pty.go)

@tgmpje
Copy link

tgmpje commented Jun 21, 2022

Adding a snooze so we get a ping once the PR has been merged.

@SnoozeThis creack/pty#109

@SnoozeThis
Copy link

(https://snoozeth.is/WM8xZZDUIIA) I will wait until creack/pty#109 is merged and then add a comment.

@EldinHb
Copy link

EldinHb commented Nov 6, 2022

This PR creack/pty#155 looks a bit more lively

@EldinHb
Copy link

EldinHb commented Nov 7, 2022

Btw, as a workaround you can install WSL on Windows. Setup lazygit how you want it to be in your WSL environment. On your Windows environment go to your project and type the command wsl lazygit. That way WSL will activate lazygit on your current directory even if on Windows and the pagers will work.

The downside is though that because youre on a mounted drive it can get very slow with large/many files.

@SnoozeThis
Copy link

An error occurred while snoozing: Pull request was closed without being merged

@pidgeon777
Copy link

Any update for Windows users running lazygit?

@aropele
Copy link

aropele commented May 23, 2023

Same problem here. Cannot use lazygit if delta is not supported.

@jesseduffield
Copy link
Owner

Our hope rests on the fate of this PR: creack/pty#155

@searleser97
Copy link

+1 to this

@pidgeon777
Copy link

Hopefully this will be fixed / merged.

@Kaarel
Copy link

Kaarel commented Feb 15, 2024

+1

@Ponti17
Copy link

Ponti17 commented Feb 28, 2024

Any news?

@Dragon1573
Copy link

Till now, this issue is still there. 😞

Environments
(Miniconda3)
Dragon1573@MateBook-X-Pro MINGW64 /
$ delta --version
delta 0.17.0
(Miniconda3)
Dragon1573@MateBook-X-Pro MINGW64 /
$ lazygit --version
commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=windows, arch=amd64, git version=2.40.1.windows.1
(Miniconda3)
Dragon1573@MateBook-X-Pro MINGW64 /
$ winget list delta
名称  ID               版本   源
-------------------------------------
delta dandavison.delta 0.17.0 winget
(Miniconda3)
Dragon1573@MateBook-X-Pro MINGW64 /
$ winget list lazygit
名称    ID                    版本   源
--------------------------------------------
lazygit JesseDuffield.lazygit 0.41.0 winget
(Miniconda3)
Dragon1573@MateBook-X-Pro MINGW64 /
$ systeminfo.exe

OS 名称:          Microsoft Windows 11 专业版
OS 版本:          10.0.22635 暂缺 Build 22635
OS 配置:          独立工作站
OS 构建类型:      Multiprocessor Free
系统类型:         x64-based PC
~/.gitconfig
[core]
pager = delta

[interactive]
diffFilter = delta --color-only --features=interactive

[delta]
navigate = true
light = false
true-color = always
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
features = decorations

[delta "interactive"]
keep-plus-minus-markers = false

[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]
tool = code.exe
colorMoved = default

Screenshots

image
image

@Ahmed-Zahran-AZ
Copy link

Any updates?

@pidgeon777
Copy link

Our hope rests on the fate of this PR: creack/pty#155

I think we should leave some comments here, for updates.

@Perry3D
Copy link

Perry3D commented May 9, 2024

What about switching to https://github.com/iyzyi/aiopty?

@pidgeon777
Copy link

What about switching to https://github.com/iyzyi/aiopty?

I didn't know about that repository, but it seems rather new? With all the pros and cons.

@GitMurf
Copy link

GitMurf commented Sep 15, 2024

Ughhh, looks like still waiting on creack/pty#155 and they seem to be facing the most problematic issue ... getting time outside their day job :-(

Last update was in June with Still working on it, but busy with day job...

@echaya
Copy link

echaya commented Nov 3, 2024

Updated:

Support does not extend to Windows users, because we're making use of a package which doesn't have Windows support

above is actually in the doc I completely ignored when reading the page (by directly jumping to delta section => testing => repo issue search => trying out diff-so-fancy 😓

FWIW, difftastic works in windows as external diff command within lazygit.

Original post:

Should we highlight this on the custom pager section of readme.md or otherwise in the doc. Hours been spent before I realized this is not supported (yet)

@pidgeon777
Copy link

Should we highlight this on the custom pager section of readme.md or otherwise in the doc. Hours been spent before I realized this is not supported (yet)

Could be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests