diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index b22845a8..8942dd95 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -20,7 +20,7 @@ "dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" }, "flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "grug-far.nvim": { "branch": "main", "commit": "8d0ad05760ee13e4e17dca19b2a1254eb335199a" }, + "grug-far.nvim": { "branch": "main", "commit": "6a293a68365cff235faad3dd3851c36c829be13e" }, "image.nvim": { "branch": "master", "commit": "5f8fceca2d1be96a45b81de21c2f98bf6084fb34" }, "inc-rename.nvim": { "branch": "main", "commit": "1871ca49ae6ee3e9ebee37955ba10c7b1425974f" }, "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, @@ -79,7 +79,7 @@ "pomo.nvim": { "branch": "main", "commit": "aa8decc421d89be0f10b1fc6a602cdd269f350ff" }, "presence.nvim": { "branch": "main", "commit": "df0a0b52cd0799e99d1b76805d1357ae9c0d017d" }, "refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" }, - "rustaceanvim": { "branch": "master", "commit": "9032904f60bd01cab22cf0291d2f5832277618b8" }, + "rustaceanvim": { "branch": "master", "commit": "0813d4d6b3f007a7ca92046f3ccb848e978db35f" }, "snacks.nvim": { "branch": "main", "commit": "60bd4e108cf7b2df0c0f578815b2b985d2cc2871" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" }, diff --git a/.config/nvim/lua/plugins/image.lua b/.config/nvim/lua/plugins/image.lua index 278ffe28..6b9cfe19 100644 --- a/.config/nvim/lua/plugins/image.lua +++ b/.config/nvim/lua/plugins/image.lua @@ -20,6 +20,9 @@ local function resolver(document_path, image_path, fallback) -- fallback to default return fallback(document_path, image_path) end +local function tester(document_path, image_path, fallback) + return fallback(document_path, image_path) +end -- local function simple_resolver(document_path, image_path, fallback) -- image_path = "/home/fic/second-brain" -- end @@ -33,7 +36,14 @@ return { markdown = { enabled = true, -- From https://github.com/3rd/image.nvim/issues/190 - resolve_image_path = resolver, + 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, }, }, },