What
lua/config/image.lua defines a preview_image() function that is never called, never exported from the module, and has commented-out window-creation code. The file is required from init.lua but contributes nothing at startup.
Where
lua/config/image.lua (full file, 12 lines):
local function preview_image(path)
local id = vim.ui.img.set(
vim.fn.readblob(path),
{ row = 0, col = 0, width = 100, height = 50, zindex = 0 }
)
return id
end
init.lua:7 — require("config.image") loads this file every startup.
Why it matters
- Silently non-functional:
vim.ui.img.set() is an experimental Neovim 0.12 image API. The function is never invoked, so any API breakage goes undetected.
- Misleading require: The
init.lua load implies something happens at startup, but nothing does.
- Incomplete feature: Commented-out window-creation code suggests a float-based image preview was planned but never finished.
Recommended action
Option A — Remove: Delete lua/config/image.lua and the require("config.image") line in init.lua:7 until the feature is ready.
Option B — Complete: Wire preview_image() to a :PreviewImage command or keymap that opens an image in a float. Guard with if vim.fn.has("nvim-0.12") == 1.
Option C — Mark as stub: Add a -- TODO comment and keep the file as a placeholder for when vim.ui.img stabilises.
What
lua/config/image.luadefines apreview_image()function that is never called, never exported from the module, and has commented-out window-creation code. The file isrequired frominit.luabut contributes nothing at startup.Where
lua/config/image.lua(full file, 12 lines):init.lua:7—require("config.image")loads this file every startup.Why it matters
vim.ui.img.set()is an experimental Neovim 0.12 image API. The function is never invoked, so any API breakage goes undetected.init.luaload implies something happens at startup, but nothing does.Recommended action
Option A — Remove: Delete
lua/config/image.luaand therequire("config.image")line ininit.lua:7until the feature is ready.Option B — Complete: Wire
preview_image()to a:PreviewImagecommand or keymap that opens an image in a float. Guard withif vim.fn.has("nvim-0.12") == 1.Option C — Mark as stub: Add a
-- TODOcomment and keep the file as a placeholder for whenvim.ui.imgstabilises.