Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/princejoogie/chafa.nvim
A neovim plugin for viewing images.
https://github.com/princejoogie/chafa.nvim
chafa lua neovim neovim-plugin nvim nvim-plugin plugin utility vim
Last synced: 3 days ago
JSON representation
A neovim plugin for viewing images.
- Host: GitHub
- URL: https://github.com/princejoogie/chafa.nvim
- Owner: princejoogie
- License: mit
- Created: 2022-12-28T13:41:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T16:03:25.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T19:37:39.280Z (12 days ago)
- Topics: chafa, lua, neovim, neovim-plugin, nvim, nvim-plugin, plugin, utility, vim
- Language: Lua
- Homepage:
- Size: 8.73 MB
- Stars: 64
- Watchers: 3
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chafa.nvim
A neovim plugin for viewing images.
![demo](https://user-images.githubusercontent.com/47204120/211049752-7790771d-2f72-4c6c-94a0-9c0fefe650db.gif)
> This plugin uses [chafa](https://github.com/hpjansson/chafa) under the hood to convert images to an output that can be printed in a terminal. It then uses [baleia](https://github.com/m00qek/baleia.nvim) to colorize text with ANSI escape sequences
## Prerequisites
- Install [chafa](https://github.com/hpjansson/chafa) and make sure it is in your path
- Neovim 0.7+## Installation
```lua
use {
"princejoogie/chafa.nvim",
requires = {
"nvim-lua/plenary.nvim",
"m00qek/baleia.nvim"
},
}
```## Setup
```lua
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](https://user-images.githubusercontent.com/47204120/211049821-1913bd5a-e943-4857-9a71-7cec433925d3.gif)