diff --git a/lua/plugin/obsidian.lua b/lua/plugin/obsidian.lua index 3cba993..c2b71df 100644 --- a/lua/plugin/obsidian.lua +++ b/lua/plugin/obsidian.lua @@ -67,15 +67,20 @@ return { new_notes_location = "current_dir", - wiki_link_func = function(opts) - return require("obsidian.util").wiki_link_id_prefix(opts) - end, + wiki_link_func = "use_alias_only", + + -- wiki_link_func = function(opts) + -- return require("obsidian.util").wiki_link_id_prefix(opts) + -- end, preferred_link_style = "wiki", note_id_func = function(title) - return tostring(os.date("%Y-%m-%d") .. "-" .. title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()) + return title end, + -- note_id_func = function(title) + -- return tostring(os.date("%Y-%m-%d") .. "-" .. title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()) + -- end, disable_frontmatter = true, -- Optional, by default when you use `:ObsidianFollowLink` on a link to an external @@ -91,7 +96,7 @@ return { -- file it will be ignored but you can customize this behavior here. ---@param img string follow_img_func = function(img) - vim.fn.jobstart({ "xdg-open", url }) -- linux + vim.fn.jobstart({ "xdg-open", img }) -- linux end, attachments = { -- The default folder to place images in via `:ObsidianPasteImg`.