You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Ask your question!
I'm trying to display images using telescope plugin, but the pictures not displayed, I've also tried to display them using chafa and wezterm imgcat.
What could be the problem? Is this some kind of incompatibility between neovim and wezterm, or is the problem in general in the plugin or script for display?
Plugin, which using chafa for displaying images: https://github.com/nvim-telescope/telescope-media-files.nvim
Example of a script with which I also tried to display images:
require("telescope").setup {
defaults = {
preview = {
mime_hook = function(filepath, bufnr, opts)
local is_image = function(filepath)
local image_extensions = {'png','jpg'} -- Supported image formats
local split_path = vim.split(filepath:lower(), '.', {plain=true})
local extension = split_path[#split_path]
return vim.tbl_contains(image_extensions, extension)
end
if is_image(filepath) then
local term = vim.api.nvim_open_term(bufnr, {})
local function send_output(_, data, _ )
for _, d in ipairs(data) do
vim.api.nvim_chan_send(term, d..'\r\n')
end
end
vim.fn.jobstart(
{
'chafa', filepath -- Terminal image viewer command
},
{on_stdout=send_output, stdout_buffered=true, pty=true})
else
require("telescope.previewers.utils").set_preview_message(bufnr, opts.winid, "Binary cannot be previewed")
end
end
},
}
}
I also tried wezterm' ,'imgcat, but get same result, image is not displayed.
But when i try to display image in wezterm, all works fine
Also try add to script default imgcat, it works, but not properly
I was only able to get the result when I specified for chafa --format=symbols, any other formats don't work, including --format=iterm
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What Operating System(s) are you running on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240203-110809-5046fc22
Ask your question!
I'm trying to display images using telescope plugin, but the pictures not displayed, I've also tried to display them using chafa and wezterm imgcat.
![image](https://private-user-images.githubusercontent.com/30772868/324262170-9c651d4b-af89-408f-b1a6-12a575993319.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMjg4MjMsIm5iZiI6MTcxOTIyODUyMywicGF0aCI6Ii8zMDc3Mjg2OC8zMjQyNjIxNzAtOWM2NTFkNGItYWY4OS00MDhmLWIxYTYtMTJhNTc1OTkzMzE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDExMjg0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlYmI4NTI1OGQ3ZTcyOGVkNjlkMmFkOTVlODQ5NDlkZTM4MmNlOGFiYTQyOTExNmM3MWE1OTViNTc3N2EzYjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gj9iLDp9_qUhQdVz1v2kqjbmuP_UwOQMDfj0UkT_anE)
What could be the problem? Is this some kind of incompatibility between neovim and wezterm, or is the problem in general in the plugin or script for display?
Plugin, which using chafa for displaying images:
https://github.com/nvim-telescope/telescope-media-files.nvim
Example of a script with which I also tried to display images:
I also tried
![image](https://private-user-images.githubusercontent.com/30772868/324262570-2b995ef2-b615-4ad2-a200-6b1796de9963.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMjg4MjMsIm5iZiI6MTcxOTIyODUyMywicGF0aCI6Ii8zMDc3Mjg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XotU2lnbmF0dXJlPTQ0ODkyZTUyYjhlMmVhMDM0YTEwM2ZlZDc2NzFlNGFkMDEyOTRiYjJkZDYwMjI1MDc5YjI4ZmZlMmEwMWM4MDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KQZHk7voc5lTVmilWJDpmFYa6ucvp6UKc8SN1ygXpjY)
![image](https://private-user-images.githubusercontent.com/30772868/324278694-0dd4e8ba-30ba-489c-8c87-584e8955c6c9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMjg4MjMsIm5iZiI6MTcxOTIyODUyMywicGF0aCI6Ii8zMDc3Mjg2OC8zMjQyNzg2OTQtMGRkNGU4YmEtMzBiYS00ODljLThjODctNTg0ZTg5NTVjNmM5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDExMjg0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlMmNmODgwMjNmMDEyMjNkYTRiMzAwYjgxYWEyNDRiN2Y4N2ZjYzEyNTgyNGNhODM5ZmE5YmM3M2I5ZWNiOTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0zg7Ybk-QOU1Zk39gnI19YoItXeg9_hTOBGqZOd7qlA)
wezterm' ,'imgcat
, but get same result, image is not displayed.But when i try to display image in wezterm, all works fine
Also try add to script default imgcat, it works, but not properly
I was only able to get the result when I specified for chafa
--format=symbols
, any other formats don't work, including--format=iterm
Beta Was this translation helpful? Give feedback.
All reactions