You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mod_ui is assigned but never referenced anywhere in the file. lib/ui.lua is loaded at Neovim startup for no effect. The lib/ui.lua module itself only exports Window.create_tmp_float_window(), which is also never called from anywhere in the config.
2. preview_image() is dead code using an unimplemented API — lines 3–11
preview_image is never called; there is no user command or keymap that invokes it.
vim.ui.img.set() references an API that is still an open proposal (image API neovim/neovim#30889) and is not available in current Neovim stable releases.
The -- image api does not associate with window at this point, check later comment (line 5 in the original) confirms this is intentional WIP.
Where
lua/config/image.lua:1–12 (the entire file) lua/lib/ui.lua — loaded unnecessarily, also contains dead create_tmp_float_window()
Why it matters
A require("lib.ui") at startup wastes module load time (trivial but unnecessary).
If vim.ui.img ever ships as a stable API, the code needs to be wired up before it does anything useful.
If vim.ui.img never ships (or lands under a different name), the file is a permanent stub.
Recommended action
Two options:
Option A — activate the feature: When vim.ui.img is available in the running Neovim, expose preview_image via a :ImagePreview command with a pcall guard:
Option B — remove the stub: Drop image.lua from init.lua, remove require("lib.ui"), and leave a TODO comment in init.lua pointing to neovim/neovim#30889 for when the API lands.
Also consider removing or trimming lib/ui.lua — it exposes only Window.create_tmp_float_window() which duplicates what vim.api.nvim_open_win() does in 4 lines.
What
lua/config/image.luahas two distinct problems:1. Unused
require("lib.ui")— line 1mod_uiis assigned but never referenced anywhere in the file.lib/ui.luais loaded at Neovim startup for no effect. Thelib/ui.luamodule itself only exportsWindow.create_tmp_float_window(), which is also never called from anywhere in the config.2.
preview_image()is dead code using an unimplemented API — lines 3–11preview_imageis never called; there is no user command or keymap that invokes it.vim.ui.img.set()references an API that is still an open proposal (image API neovim/neovim#30889) and is not available in current Neovim stable releases.-- image api does not associate with window at this point, check latercomment (line 5 in the original) confirms this is intentional WIP.Where
lua/config/image.lua:1–12(the entire file)lua/lib/ui.lua— loaded unnecessarily, also contains deadcreate_tmp_float_window()Why it matters
require("lib.ui")at startup wastes module load time (trivial but unnecessary).vim.ui.imgever ships as a stable API, the code needs to be wired up before it does anything useful.vim.ui.imgnever ships (or lands under a different name), the file is a permanent stub.Recommended action
Two options:
Option A — activate the feature: When
vim.ui.imgis available in the running Neovim, exposepreview_imagevia a:ImagePreviewcommand with apcallguard:Option B — remove the stub: Drop
image.luafrominit.lua, removerequire("lib.ui"), and leave a TODO comment in init.lua pointing to neovim/neovim#30889 for when the API lands.Also consider removing or trimming
lib/ui.lua— it exposes onlyWindow.create_tmp_float_window()which duplicates whatvim.api.nvim_open_win()does in 4 lines.