From 3f0322eed12c051b891b825381f32b9a19393760 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 3 Dec 2024 17:45:03 -0500 Subject: [PATCH] AutoYADM commit: 2024-12-03 17:45:03 --- .config/nvim/lua/plugins/image.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.config/nvim/lua/plugins/image.lua b/.config/nvim/lua/plugins/image.lua index d88421cc..e73598bf 100644 --- a/.config/nvim/lua/plugins/image.lua +++ b/.config/nvim/lua/plugins/image.lua @@ -11,21 +11,24 @@ return { { "3rd/image.nvim", + lazy = false, opts = { integrations = { markdown = { + enabled = true, -- From https://github.com/3rd/image.nvim/issues/190 - resolve_image_path = function(document_path, image_path, fallback) - local working_dir = vim.fn.getcwd() - -- Format path for Obsidian vault - if working_dir:find("~/second-brain/", 1, true) then - -- if working_dir:find("~/second-brain/") then - print("Res image: " .. working_dir .. "/" .. image_path) - return working_dir .. "/" .. image_path - end - -- fallback to default - return fallback(document_path, image_path) - end, + -- resolve_image_path = function(document_path, image_path, fallback) + -- local working_dir = vim.fn.getcwd() + -- -- Format path for Obsidian vault + -- if working_dir:find("~/second-brain/", 1, true) then + -- -- if working_dir:find("~/second-brain/") then + -- local out = "Obsidian image: " .. working_dir .. "/" .. image_path + -- Snacks.notify.notify(out) + -- return working_dir .. "/" .. image_path + -- end + -- -- fallback to default + -- return fallback(document_path, image_path) + -- end, }, }, },