From 50242f385835ac8761f3a2006b8464c2f462e9c1 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:18:35 +0800 Subject: [PATCH 1/2] doc fixes (#675) --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc014e803..d5d382b62 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,10 @@ return { -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: -- event = { -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. - -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" - -- "BufReadPre path/to/my-vault/**.md", - -- "BufNewFile path/to/my-vault/**.md", + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" + -- -- refer to `:h file-pattern` for more examples + -- "BufReadPre path/to/my-vault/*.md", + -- "BufNewFile path/to/my-vault/*.md", -- }, dependencies = { -- Required. @@ -391,12 +392,13 @@ This is a complete list of all of the options that can be passed to `require("ob vim.fn.jobstart({"open", url}) -- Mac OS -- vim.fn.jobstart({"xdg-open", url}) -- linux -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows + -- vim.ui.open(url) -- need Neovim 0.10.0+ end, -- 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. ---@param img string - follow_url_func = function(img) + follow_img_func = function(img) vim.fn.jobstart { "qlmanage", "-p", img } -- Mac OS quick look preview -- vim.fn.jobstart({"xdg-open", url}) -- linux -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows From 14e0427bef6c55da0d63f9a313fd9941be3a2479 Mon Sep 17 00:00:00 2001 From: epwalsh Date: Thu, 1 Aug 2024 18:19:07 +0000 Subject: [PATCH 2/2] chore(docs): auto generate docs --- doc/obsidian.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/obsidian.txt b/doc/obsidian.txt index 8a11e083c..fc0539948 100644 --- a/doc/obsidian.txt +++ b/doc/obsidian.txt @@ -176,9 +176,10 @@ USING LAZY.NVIM ~ -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: -- event = { -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. - -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" - -- "BufReadPre path/to/my-vault/**.md", - -- "BufNewFile path/to/my-vault/**.md", + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" + -- -- refer to `:h file-pattern` for more examples + -- "BufReadPre path/to/my-vault/*.md", + -- "BufNewFile path/to/my-vault/*.md", -- }, dependencies = { -- Required. @@ -447,12 +448,13 @@ carefully and customize it to your needs: vim.fn.jobstart({"open", url}) -- Mac OS -- vim.fn.jobstart({"xdg-open", url}) -- linux -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows + -- vim.ui.open(url) -- need Neovim 0.10.0+ end, -- 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. ---@param img string - follow_url_func = function(img) + follow_img_func = function(img) vim.fn.jobstart { "qlmanage", "-p", img } -- Mac OS quick look preview -- vim.fn.jobstart({"xdg-open", url}) -- linux -- vim.cmd(':silent exec "!start ' .. url .. '"') -- Windows