ibhagwan / fzf-lua

Improved fzf.vim written in lua
MIT License
2.24k stars 145 forks source link

Feature: use `kitten icat` for previewing images #1136

Closed yujinyuz closed 6 months ago

yujinyuz commented 6 months ago

Have you RTFM'd?

Feature Request

When you run kitten icat /path/to/img.jpeg it displays the image properly within the terminal.

image

I tried using that command as a previewer but can't seem to get it to work.

image
    previewers = {
      builtin = {
        extensions = {
          ['png'] = { 'kitten', 'icat' },
          ['webp'] = { 'kitten', 'icat' },
          ['jpg'] = { 'kitten', 'icat' },
        },
      },
    },

It also works with the fzf-preview.sh command provided inside fzf's repository

image
ibhagwan commented 6 months ago

Not sure why you're getting the binary file message (probably misconfiguration).

In any event, this cannot work as kitty icat isn't supported inside a neovim terminal (https://github.com/neovim/neovim/issues/12991), try to display an imagei in a neovim terminal and you'll see this: image

yujinyuz commented 6 months ago

@ibhagwan Shame that it doesn't work on neovim (yet). Anyway thanks for the prompt response!