diff --git a/lua/markdown-notes/links.lua b/lua/markdown-notes/links.lua index 7faa36c..5be1ce7 100644 --- a/lua/markdown-notes/links.lua +++ b/lua/markdown-notes/links.lua @@ -70,7 +70,7 @@ function M.follow_link() -- Try to find the file if exact match doesn't exist if vim.fn.filereadable(file_path) == 0 then - local find_cmd = "find " + local find_cmd = "find -L " .. vim.fn.expand(options.vault_path) .. " -name '*" .. link_text diff --git a/lua/markdown-notes/notes.lua b/lua/markdown-notes/notes.lua index 29b5af6..c264c10 100644 --- a/lua/markdown-notes/notes.lua +++ b/lua/markdown-notes/notes.lua @@ -160,8 +160,8 @@ function M.search_tags() local vault_path = vim.fn.expand(options.vault_path) - -- Get all markdown files - local find_cmd = "find " .. vim.fn.shellescape(vault_path) .. + -- Get all markdown files (-L follows symlinks) + local find_cmd = "find -L " .. vim.fn.shellescape(vault_path) .. " -name '*.md' -type f -not -path '*/.*'" local all_files = vim.fn.systemlist(find_cmd)