Render images and simple 3D assets directly inside the current Neovim buffer.
rndr.nvim pairs a Lua plugin with a native C++ renderer. Open an image or model, run :RndrOpen, and the buffer is replaced with an in-place preview you can rerender, rotate, and restore.
- Raster images:
png,jpg,jpeg,gif,bmp,webp,tga,psd,hdr,pic,pnm,ppm,pgm,pbm - Vector images:
svg,svgz - Models:
obj,fbx,glb,gltf,dae,3ds,blend,ply,stl,x,off - SVG rasterizers:
rsvg-convert,magick, orconvert
Required:
- Neovim with Lua support
git- CMake
3.16+ - A C++23-capable compiler
Optional:
rsvg-convert,magick, orconvertfor SVG rendering
lazy.nvim:
{
"SalarAlo/rndr.nvim",
build = "make",
config = function()
require("rndr").setup()
end,
}Note
Compile times can take a while. Installing assimp locally can drastically reduce compile times.
If lazy.nvim times out your installation, add the following to your lazy config:
require("lazy").setup({
git = {
timeout = 900 -- 15 minutes
}
})packer.nvim:
use({
"SalarAlo/rndr.nvim",
run = "make",
config = function()
require("rndr").setup()
end,
})If make is unavailable:
{
"SalarAlo/rndr.nvim",
build = "./scripts/build_renderer.sh",
}If you keep the binary somewhere else, override renderer.bin in setup().
Clone the repository and build the native renderer:
git clone https://github.com/SalarAlo/rndr.nvim.git
cd rndr.nvim
makeThis produces the renderer binary at renderer/build/rndr.
If assimp is not installed locally, CMake falls back to fetching a bundled copy during configure. That path still needs network access, so offline builds currently require a local assimp installation.
make is a thin wrapper around ./scripts/build_renderer.sh. If you prefer raw CMake commands:
cmake -S renderer -B renderer/build -DCMAKE_BUILD_TYPE=Release
cmake --build renderer/build --parallel --config ReleaseMinimal setup:
require("rndr").setup({
preview = {
auto_open = true,
},
})Open a supported file and run:
:RndrOpenOr render a specific file directly:
:RndrOpen lua/examples/dog.jpgCheck whether the renderer binary and optional SVG tools are available:
:checkhealth rndr:RndrOpen [path]:RndrClose:RndrRotateLeft:RndrRotateRight:RndrRotateUp:RndrRotateDown:RndrResetView
Rotation commands only affect model files.
require("rndr").setup({
preview = {
auto_open = true,
events = { "BufReadPost" },
render_on_resize = true,
},
assets = {
images = { "png", "jpg", "jpeg", "gif", "bmp", "webp" },
vectors = { "svg", "svgz" },
models = { "obj", "fbx", "glb", "gltf", "dae", "blend", "ply", "stl" },
},
window = {
termguicolors = true,
size = {
width_offset = 0,
height_offset = 0,
min_width = 1,
min_height = 1,
},
options = {
number = false,
relativenumber = false,
wrap = false,
signcolumn = "no",
},
},
renderer = {
bin = "/absolute/path/to/rndr.nvim/renderer/build/rndr",
supersample = 2,
brightness = 1.0,
saturation = 1.18,
contrast = 1.08,
gamma = 0.92,
background = "0d0f14",
},
controls = {
rotate_step = 15,
keymaps = {
close = "q",
rerender = "R",
reset_view = "0",
rotate_left = "h",
rotate_right = "l",
rotate_up = "k",
rotate_down = "j",
},
},
})Telescope preview override:
local rndr = require("rndr")
require("telescope").setup({
defaults = {
buffer_previewer_maker = rndr.telescope_buffer_previewer_maker,
},
})This keeps Telescope's normal previewer for non-renderable files and swaps in rndr automatically for supported images and models.
The renderer can also be called directly:
./renderer/build/rndr <file> <term-width> <term-height> [supersample] [yaw] [pitch] [brightness] [saturation] [contrast] [gamma] [background].
├── lua/rndr/ # Neovim plugin code
├── lua/examples/ # Sample assets
├── renderer/ # Native renderer built with CMake
├── scripts/ # Build helpers
└── showcase/ # README media
