kohane27 / chafa.nvim

A neovim plugin for viewing images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chafa.nvim

A neovim plugin for viewing images.

demo

This plugin uses chafa under the hood to convert images to an output that can be printed in a terminal. It then uses baleia to colorize text with ANSI escape sequences

Prerequisites

  • Install chafa and make sure it is in your path
  • Neovim 0.7+

Installation

use {
  "princejoogie/chafa.nvim",
  requires = {
    "nvim-lua/plenary.nvim"
    "m00qek/baleia.nvim"
  },
},

Setup

require("chafa").setup({
  render = {
    min_padding = 5,
    show_label = true,
  },
  events = {
    update_on_nvim_resize = true,
  },
})

User Commands

This plugin creates a ViewImage user command which you can manually call in svg files to view them in a separate buffer.

demo

About

A neovim plugin for viewing images.

License:MIT License


Languages

Language:Lua 100.0%