-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't show image preview when open inside neovim #112
Comments
I have this issue myself. I looked into it a while ago and I think this is not supported in neovim's embedded terminal yet. I don't know if this can be resolved until support is added. Let's keep this open to track the status as well as any additional findings and ideas. |
@mikavilpas buddy check this out: https://new.reddit.com/r/neovim/comments/1dcjuxc/simplyfilenvim_now_can_use_3rdimagenvim_to/ might be able to steal 😉 some code |
Ok, nice find - that was fast 😄 ! I think that might work nicely, but one issue remains: in neovim, we don't yet know This is actually a neovim specific limitation and can be worked around with e.g. my proposal at So it would work like this: sequenceDiagram
neovim->>yazi: open yazi
yazi->>neovim: file hovered event: /path/to/image.png
neovim-->neovim: preview image
yazi->>neovim: file hovered event: /path/to/file.txt
neovim-->neovim: 🔎 not an image, don't preview anything
|
I also wonder if this would work if yazi were configured to use https://github.com/jstkdng/ueberzugpp with yazi. I haven't tried this out, so it might be subject to the same neovim terminal limitation which causes images not to show. |
we can check the filetype? restrict the config to |
The issue is not yet knowing the name of the file that is hovered in yazi. |
https://yazi-rs.github.io/docs/configuration/yazi/#preview.ueberzug_scale |
Want to do an experiment with yazi + ueberzugpp + yazi.nvim to see if it works with this configuration? 🙂 |
wait what? it already works there's no need for anything to be done 🙃, i havent updated, i dont use Important we have to pass something to the main config of yazi for the ueberzug offset ( [preview]
ueberzug_offset = [7.5,1,0,0] Important this ⬆️ is what i configured for correct display of image, and it might be different for different people, as u might see the below images, the ueberzug offset is messed up ... opts = {
floating_window_scaling_factor = 1,
} opts = {
floating_window_scaling_factor = 0.8,
} |
Oh, nice! Excellent work! |
ok i didnt do anything, my ueberzug wasnt working (i hadnt updated it for a while) :p |
Regarding Yazi's behavior in Neovim: https://yazi-rs.github.io/docs/image-preview#neovim |
Awesome - thanks for the link! |
When opened inside neovim, the image preview just doesn't work
This is when open outside of neovim
The text was updated successfully, but these errors were encountered: