AutoYADM commit: 2024-12-03 17:40:03
This commit is contained in:
parent
d09d36f180
commit
63ee379022
1 changed files with 18 additions and 1 deletions
|
@ -11,6 +11,23 @@
|
|||
return {
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
opts = {},
|
||||
opts = {
|
||||
integrations = {
|
||||
markdown = {
|
||||
-- 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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue