Closed neuromaancer closed 5 months ago
There is a screenshot for this:
There should be an image at line 3, but no picture is shown, but the space is there.
Has to be something in your setup, do you have the latest version of ueberzugpp?
I installed ueberzugpp
via homebrew and it is the lastest version. My setting is:
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;"
package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;"
return {
"3rd/image.nvim",
ft = "markdown",
opts = {
backend = "ueberzug",
integrations = {
markdown = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
},
neorg = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "norg" },
},
},
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened
},
}
I am experiencing a similar issue with both the kitty and ueberzug backends.
However, with some testing with the minimal-setup.lua file, I realized this only occurs in a (poetry) virtual environment. Are there any steps that need to be taken to make the plugin compatible with virtual environments?
Edit: This appears to be a poetry issue for me. Just tried it with venv and it works as advertised.
Yeah, not sure what's going wrong, these are edge cases that need debugging where the issue happens. @neuromaancer afraid I can't help, you can try debugging what's going, it has to be something specific to your setup. The first rewrite of the plugin is in-progress, and we'll have a logging & troubleshooting layer soon.
I am facing the same issue when using the kitty backend on a M1 Mac, but creating the project virtual environment using pipenv. Everything works well if the virtual environment is created using venv (python -m venv .venv
). Does anyone know what the issue could be for pipenv / poetry virtual environments?
Same problem here, and I am also not sure why it specifically does not work with those two.
However, if you change your python host program and path manually instead to prepend the correct folders it does work fine again:
local p = vim.env.PATH or ""
vim.g["python3_host_prog"] = vim.fn.expand("<YOUR-PYTHON-BIN-HERE>")
vim.env.PATH = "<YOUR-VENV-PATH-HERE> .. "/bin:" .. p
Since this is (effectively) all the activation scripts are doing, it must be some interaction with the script on poetry's end. If pipenv has the same issues perhaps it could be possible to compare activation scripts to find the culprit.
This is super weird, as the plugin itself doesn't use anything python-related, it could be a deeper bug :eyes:
I finally successfully install the
imagemagick
and ueberzugpp. It seems no errors and warnings, but it doesn't show any image in my markdown file. However, it leaves the space for the image! I am sure thatueberzugpp
is working because I have yazi installed, it usesueberzugpp
, and it works well. I don't know whether it is a bug or something wrong with my side.