3rd / image.nvim

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

Link and preview overlap in markdown integration #103

Open Poly2it opened 9 months ago

Poly2it commented 9 months ago

Screenshot from 2023-12-29 14-08-41

Using standard configuration with conceal level 2 on Kitty.

Poly2it commented 9 months ago

The issue seems to "resolve" itself when I decrease the terminal font size.

3rd commented 9 months ago

It could be something weird about how Kitty reads those pngs, does it do the same if you convert them to a different format?

iAurora commented 1 week ago

Having the same issue.

I had a hard time trying to figure out why the minimal setup appeared to work well, yet my own note was rendering weirdly, even after copying and pasting the exact same setup code into my init.lua. This issue made me try reducing the text size, and yes, the image rendered fine once the text was small enough to prevent wrapping. Each soft-wrapped line causes the image to shift one line above where it should be. Since Wezterm doesn't render images properly to begin with, I'm not sure how to get a workable solution with the Kitty protocol on a Mac.

This is what minimal setup gives after editing the text to be a bit longer:

image

Using kitty 0.36.2 on macOS Sonoma 14.6.1

3rd commented 1 week ago

Hey, what are you using to display the bar on the top? I think that part interacts in a weird way and causes the offset. (if it's not indeed softwrapping)

iAurora commented 1 week ago

That screenshot displays the result of running nvim --clean -c ":luafile minimal-setup.lua". All I changed in the file I got from this repo is the length of the text. I'm not 100% sure what's happening and why there are 2 windows being opened but this is what my whole terminal window looks like.

If change the text to a shorter one or adjust the font size in terminal so it fits on one line, the problem disappears. If I make the text even longer and it wraps into more lines, the image gets moved up even further.

image
iAurora commented 1 week ago

Same issue is there on my regular config without any bars displayed

image