image.nvim icon indicating copy to clipboard operation
image.nvim copied to clipboard

[Feature Request] Popup Preview

Open scientiac opened this issue 1 year ago • 2 comments

Is it possible to render images on the popup preview like the one that lsp creates for autocompletion. That way the lines wouldn't jump around when scrolling and when only_render_image_at_cursor is enabled.

scientiac avatar Aug 09 '24 13:08 scientiac

Hey @scientiac, can you try this branch? https://github.com/3rd/image.nvim/tree/feature/only_render_image_at_cursor_mode

3rd avatar Aug 15 '24 19:08 3rd

I am using kitty terminal and upon enabling that feature, it gives me the following error when I put the cursor to the image link:

Error executing vim.schedule lua callback: .../share/nvim/lazy/image.nvim/lua/image/utils/document.lua:113: Invalid 'width': Number is not integral                    
stack traceback:                                                                                                                                                       
        [C]: in function 'nvim_open_win'                                                                                                                               
        .../share/nvim/lazy/image.nvim/lua/image/utils/document.lua:113: in function 'render_image'                                                                    
        .../share/nvim/lazy/image.nvim/lua/image/utils/document.lua:170: in function ''                                                                                
        vim/_editor.lua: in function <vim/_editor.lua:0> 

scientiac avatar Aug 16 '24 02:08 scientiac