From 9b28947752966a8d1a01823b3a9fb99f9e786ec0 Mon Sep 17 00:00:00 2001 From: Arastoo Khajehee Date: Mon, 30 Mar 2026 15:43:05 +0900 Subject: [PATCH] added image rendering for markdown --- init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/init.lua b/init.lua index eeb8dd61..92ad6951 100644 --- a/init.lua +++ b/init.lua @@ -921,6 +921,26 @@ require('lazy').setup({ 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 -- 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.