3rd / image.nvim

🖼️ Bringing images to Neovim.
MIT License
1.03k stars 42 forks source link

Minimal setup works but others don't #219

Open KayjiYu opened 1 week ago

KayjiYu commented 1 week ago

Hi

I'm having trouble rendering images in my own setup and own markdown files.

The minimal-setup.lua works from my end, which could probably prove something like "imagemagick" and "magic rock" are installed correctly.

Screenshot 2024-09-24 at 10 05 38 AM

However it doesn't work in my own Neovim.

Screenshot 2024-09-24 at 10 11 14 AM

The config of image.nvim is attached below, which I just copy and paste. ![Uploading Screenshot 2024-09-24 at 10.16.29 AM.png…]()

No error occurs in my Neovim. Just not render images. I watched a youtube video regarding not rendering images in his Obsidian. The youtuber claims that it happens because image.nvim can't locate where the images come from in the Obsidian and finally modifies the "current_image.url" to his local path. I'm not using Obsidian. I don't know if it is the same reason and I don't know how to work around it.

I appreciate you time and help

KayjiYu commented 1 week ago
Screenshot 2024-09-24 at 10 16 29 AM
3rd commented 1 week ago

Hey, does it happen when there are other non-image lines at the beginning of the document? It might be a bug with images on the first line of the buffer.

KayjiYu commented 1 week ago

It works after adding a line of text above. Thank you very much!

Screenshot 2024-09-24 at 3 25 06 PM
3rd commented 1 week ago

So it's that bug I forgot about about, sorry :blush: Will fix it soon, I'll keep this open until it's handled.