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

[Feature] Allow to disable integration's autocommand and use integration's render

Open rainzm opened this issue 2 years ago • 2 comments

Hi. Thank you for your wonderful plugin.

Can you add a option to disable integration's autocommand setup and expose integrations's render(not image's render)? In this way, users can control the timing of render by themselves.

For example, I want to use the shortcut key to trigger whether to display the images under this file or cursor.

rainzm avatar Oct 05 '23 14:10 rainzm

Hey, thanks for the kind words! For custom handling I think it's easy for users to do a tree-sitter query and render the image, but we can add an option to toggle the rendering of an image. How should it work though? Would a ".toggle_image_at_cursor()" be enough?

3rd avatar Oct 07 '23 21:10 3rd

".toggle_image_at_cursor()" is enough and it would be better if there is another ".toggle_images_in_buffer()".

I don't know if it's easy to implement. If it's simple, can you give me a general example? I can try to achieve it.

rainzm avatar Oct 08 '23 10:10 rainzm