added image rendering for markdown

This commit is contained in:
Arastoo Khajehee 2026-03-30 15:43:05 +09:00
parent d92b2e58f1
commit 9b28947752
1 changed files with 20 additions and 0 deletions

View File

@ -921,6 +921,26 @@ require('lazy').setup({
opts = {}, opts = {},
}, },
{
'3rd/image.nvim',
config = function()
require('image').setup {
integrations = {
markdown = {
resolve_image_path = function(document_path, image_path, fallback)
-- document_path is the path to the file that contains the image
-- image_path is the potentially relative path to the image. for
-- markdown it's `![](this text)`
-- you can call the fallback function to get the default behavior
return fallback(document_path, image_path)
end,
},
},
}
end,
},
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and -- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations. -- place them in the correct locations.