update obsidian config

This commit is contained in:
xesc 2025-06-03 16:10:12 +02:00
parent dc7663d101
commit 6fe483f173

View file

@ -73,11 +73,11 @@ return {
new_notes_location = "current_dir", new_notes_location = "current_dir",
wiki_link_func = "use_alias_only", -- wiki_link_func = "use_alias_only",
-- wiki_link_func = function(opts) wiki_link_func = function(opts)
-- return require("obsidian.util").wiki_link_id_prefix(opts) return require("obsidian.util").wiki_link_id_prefix(opts)
-- end, end,
preferred_link_style = "wiki", preferred_link_style = "wiki",
@ -91,19 +91,19 @@ return {
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an external -- Optional, by default when you use `:ObsidianFollowLink` on a link to an external
-- URL it will be ignored but you can customize this behavior here. -- URL it will be ignored but you can customize this behavior here.
---@param url string -- ---@param url string
follow_url_func = function(url) -- follow_url_func = function(url)
-- Open the URL in the default web browser. -- -- Open the URL in the default web browser.
-- vim.fn.jobstart({ "xdg-open", url }) -- linux -- -- vim.fn.jobstart({ "xdg-open", url }) -- linux
vim.ui.open(url) -- need Neovim 0.10.0+ -- vim.ui.open(url) -- need Neovim 0.10.0+
end, -- end,
--
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an image -- -- Optional, by default when you use `:ObsidianFollowLink` on a link to an image
-- file it will be ignored but you can customize this behavior here. -- -- file it will be ignored but you can customize this behavior here.
---@param img string -- ---@param img string
follow_img_func = function(img) -- follow_img_func = function(img)
vim.fn.jobstart({ "xdg-open", img }) -- linux -- vim.fn.jobstart({ "xdg-open", img }) -- linux
end, -- end,
attachments = { attachments = {
-- The default folder to place images in via `:ObsidianPasteImg`. -- The default folder to place images in via `:ObsidianPasteImg`.
-- If this is a relative path it will be interpreted as relative to the vault root. -- If this is a relative path it will be interpreted as relative to the vault root.