lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Custom Pager support for windows

Open bin101 opened this issue 2 years ago • 19 comments

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 avatar Aug 25 '21 18:08 bin101

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

bin101 avatar Aug 25 '21 19:08 bin101

Interestingly, we use creack/pty and on that repo there's a PR that appears to be almost across the line which supports conpty: https://github.com/creack/pty/pull/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)

jesseduffield avatar Sep 27 '21 09:09 jesseduffield

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

@SnoozeThis https://github.com/creack/pty/pull/109

tgmpje avatar Jun 21 '22 18:06 tgmpje

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

SnoozeThis avatar Jun 21 '22 18:06 SnoozeThis

This PR https://github.com/creack/pty/pull/155 looks a bit more lively

EldinHb avatar Nov 06 '22 21:11 EldinHb

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.

EldinHb avatar Nov 07 '22 12:11 EldinHb

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

SnoozeThis avatar Jan 25 '23 10:01 SnoozeThis

Any update for Windows users running lazygit?

pidgeon777 avatar May 22 '23 20:05 pidgeon777

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

aropele avatar May 23 '23 06:05 aropele

Our hope rests on the fate of this PR: https://github.com/creack/pty/pull/155

jesseduffield avatar May 23 '23 10:05 jesseduffield

+1 to this

searleser97 avatar Oct 10 '23 19:10 searleser97

Hopefully this will be fixed / merged.

pidgeon777 avatar Oct 11 '23 08:10 pidgeon777

+1

Kaarel avatar Feb 15 '24 13:02 Kaarel

Any news?

Ponti17 avatar Feb 28 '24 10:02 Ponti17

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

Dragon1573 avatar Apr 06 '24 14:04 Dragon1573

Any updates?

Ahmed-Zahran-AZ avatar Apr 11 '24 08:04 Ahmed-Zahran-AZ

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

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

pidgeon777 avatar Apr 11 '24 12:04 pidgeon777