Skip to content

princejoogie/chafa.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

view_image_demo