glow-hover.nvim
glow-hover.nvim copied to clipboard
breaks with new version of glow (1.5.0)
after updating my Archlinux and updating glow(1.4.1-3 => 1.5.0-1), This plugin kept giving me errors when i used lsp hover the second time after neovim opened (somehow the first time was always ok):
Error executing vim.schedule lua callback: ...ack/packer/start/glow-hover.nvim/lua/glow-hover/init.lua:146: 'width' key must be a positive Integer
stack traceback:
[C]: in function 'nvim_open_win'
...ack/packer/start/glow-hover.nvim/lua/glow-hover/init.lua:146: in function 'hovehandler'
...ack/packer/start/glow-hover.nvim/lua/glow-hover/init.lua:236: in function 'handler'
/usr/share/nvim/runtime/lua/vim/lsp.lua:1383: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
after some digging, found out that
-- lua/glow-hover/init.lua, line 199
local handle = io.popen(cmd)
local rendered = handle:read("*a") -- this returns empty string so width becomes zero
handle:close()
i tested same glow inputs outside of lua and it was fine and didn't give me empty results, but i don't know why in lua it keep giving empty results. downgrading glow also fixes the problem, but this will be a real problem for new users that wanna use this plugin.