@@ -176,9 +176,10 @@ USING LAZY.NVIM ~
176
176
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
177
177
-- event = {
178
178
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
179
- -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md"
180
- -- "BufReadPre path/to/my-vault/**.md",
181
- -- "BufNewFile path/to/my-vault/**.md",
179
+ -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
180
+ -- -- refer to `:h file-pattern` for more examples
181
+ -- "BufReadPre path/to/my-vault/*.md",
182
+ -- "BufNewFile path/to/my-vault/*.md",
182
183
-- },
183
184
dependencies = {
184
185
-- Required.
@@ -447,12 +448,13 @@ carefully and customize it to your needs:
447
448
vim.fn.jobstart({"open", url}) -- Mac OS
448
449
-- vim.fn.jobstart({"xdg-open", url}) -- linux
449
450
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
451
+ -- vim.ui.open(url) -- need Neovim 0.10.0+
450
452
end,
451
453
452
454
-- Optional, by default when you use `:ObsidianFollowLink` on a link to an image
453
455
-- file it will be ignored but you can customize this behavior here.
454
456
---@param img string
455
- follow_url_func = function(img)
457
+ follow_img_func = function(img)
456
458
vim.fn.jobstart { "qlmanage", "-p", img } -- Mac OS quick look preview
457
459
-- vim.fn.jobstart({"xdg-open", url}) -- linux
458
460
-- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows
0 commit comments