added image rendering for markdown
This commit is contained in:
parent
d92b2e58f1
commit
9b28947752
20
init.lua
20
init.lua
|
|
@ -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 ``
|
||||||
|
|
||||||
|
-- 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.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue