Feat(image render): remove image.nvim

We can now render images in supported terminals with snacks, so image.nvim is now redundant and
unnecessary
This commit is contained in:
2025-02-17 18:37:42 -05:00
parent 06663c59e8
commit 46e1e88ff2
+63 -63
View File
@@ -11,69 +11,69 @@ return {
build = require('data.types').smart_splits.build(), build = require('data.types').smart_splits.build(),
-- cond = not require('data.func').is_ghostty(), -- cond = not require('data.func').is_ghostty(),
}, },
{ -- Image Renderer -- { -- Image Renderer
'3rd/image.nvim', -- '3rd/image.nvim',
lazy = true, -- lazy = true,
ft = require('data.types').image, -- ft = require('data.types').image,
config = function() -- config = function()
require('image').setup({ -- require('image').setup({
backend = 'kitty', -- Kitty will provide the best experience, but you need a compatible terminal -- backend = 'kitty', -- Kitty will provide the best experience, but you need a compatible terminal
processor = 'magick_cli', -- processor = 'magick_cli',
kitty_method = 'normal', -- kitty_method = 'normal',
integrations = { -- integrations = {
markdown = { -- markdown = {
enabled = true, -- enabled = true,
clear_in_insert_mode = false, -- clear_in_insert_mode = false,
download_remote_images = true, -- download_remote_images = true,
only_render_image_at_cursor = false, -- only_render_image_at_cursor = false,
filetypes = { 'markdown', 'vimwiki' }, -- markdown extensions (ie. quarto) can go here -- filetypes = { 'markdown', 'vimwiki' }, -- markdown extensions (ie. quarto) can go here
}, -- },
neorg = { -- neorg = {
enabled = true, -- enabled = true,
clear_in_insert_mode = false, -- clear_in_insert_mode = false,
download_remote_images = true, -- download_remote_images = true,
only_render_image_at_cursor = false, -- only_render_image_at_cursor = false,
filetypes = { 'norg' }, -- filetypes = { 'norg' },
}, -- },
html = { -- html = {
enabled = false, -- enabled = false,
}, -- },
css = { -- css = {
enabled = false, -- enabled = false,
}, -- },
}, -- },
max_width = 200, -- tweak to preference -- max_width = 200, -- tweak to preference
max_height = 40, -- ^ -- max_height = 40, -- ^
max_height_window_percentage = math.huge, -- this is necessary for a good experience -- max_height_window_percentage = math.huge, -- this is necessary for a good experience
max_width_window_percentage = math.huge, -- max_width_window_percentage = math.huge,
window_overlap_clear_enabled = false, -- window_overlap_clear_enabled = false,
window_overlap_clear_ft_ignore = { -- window_overlap_clear_ft_ignore = {
'cmp_menu', -- 'cmp_menu',
'cmp_docs', -- 'cmp_docs',
'neotree', -- 'neotree',
'neominimap', -- 'neominimap',
'minimap', -- 'minimap',
'', -- '',
}, -- },
hijack_file_patterns = { -- hijack_file_patterns = {
'*.png', -- '*.png',
'*.jpg', -- '*.jpg',
'*.jpeg', -- '*.jpeg',
'*.gif', -- '*.gif',
'*.webp', -- '*.webp',
'*.avif', -- '*.avif',
}, -- render image files as images when opened -- }, -- render image files as images when opened
}) -- })
end, -- end,
cond = function() -- cond = function()
-- Disable image rendering in Neovide -- -- Disable image rendering in Neovide
-- or when vim.g.useimage = false -- -- or when vim.g.useimage = false
if vim.g.useimage == false then -- if vim.g.useimage == false then
return false -- return false
end -- end
return not vim.g.neovide -- return not vim.g.neovide
end, -- end,
}, -- },
-- { -- ToggleTerm -- { -- ToggleTerm
-- 'akinsho/toggleterm.nvim', -- 'akinsho/toggleterm.nvim',
-- event = 'TermOpen', -- event = 'TermOpen',