AutoYADM commit: 2024-12-03 17:45:03

This commit is contained in:
Daniel Fichtinger 2024-12-03 17:45:03 -05:00
parent 63ee379022
commit 3f0322eed1

View file

@ -11,21 +11,24 @@
return { return {
{ {
"3rd/image.nvim", "3rd/image.nvim",
lazy = false,
opts = { opts = {
integrations = { integrations = {
markdown = { markdown = {
enabled = true,
-- From https://github.com/3rd/image.nvim/issues/190 -- From https://github.com/3rd/image.nvim/issues/190
resolve_image_path = function(document_path, image_path, fallback) -- resolve_image_path = function(document_path, image_path, fallback)
local working_dir = vim.fn.getcwd() -- local working_dir = vim.fn.getcwd()
-- Format path for Obsidian vault -- -- Format path for Obsidian vault
if working_dir:find("~/second-brain/", 1, true) then -- if working_dir:find("~/second-brain/", 1, true) then
-- if working_dir:find("~/second-brain/") then -- -- if working_dir:find("~/second-brain/") then
print("Res image: " .. working_dir .. "/" .. image_path) -- local out = "Obsidian image: " .. working_dir .. "/" .. image_path
return working_dir .. "/" .. image_path -- Snacks.notify.notify(out)
end -- return working_dir .. "/" .. image_path
-- fallback to default -- end
return fallback(document_path, image_path) -- -- fallback to default
end, -- return fallback(document_path, image_path)
-- end,
}, },
}, },
}, },