Giter VIP home page Giter VIP logo

Comments (3)

stefanhaller avatar stefanhaller commented on September 2, 2024

I don't think it's lazygit's job to support this. Lazygit doesn't render diffs, it only takes what it gets from git (possibly passed through a pager) and displays it as-is. So if you can get git to show the images when you type git diff in the command line, it should work in lazygit. If this doesn't work (and it doesn't for me, see below), then that would be a bug report for lazygit, not an enhancement request.

Here's some documentation that describes how to set up git so that it shows images in diffs (it looks like it's specific to iTerm2, maybe you need something slightly different for kitty).

I tried these instructions, and I could get it to work in the terminal; but only if I use the --no-pager option, or pipe it through cat:
image

However, it doesn't show in lazygit:
image

I haven't investigated yet why this is.

Another problem is that some pagers seem to have problems passing on the image data correctly; for example, it doesn't work with delta (see dandavison/delta#1399), which is a major problem if you otherwise want to use delta in lazygit; I can't think of a workaround.

from lazygit.

wojciech-kulik avatar wojciech-kulik commented on September 2, 2024

@stefanhaller thank you for those tips, you are right, I was thinking about the right pane in lazygit more like some "previewer" window where I could configure how to present a diff based on a file type. However, I will try the solution you posted and see if it works 🍻 .

from lazygit.

wojciech-kulik avatar wojciech-kulik commented on September 2, 2024

I ended up with this solution for Kitty terminal: https://sw.kovidgoyal.net/kitty/kittens/diff but I'm not sure if it's possible to integrate it with lazygit

from lazygit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.