Open danilka4 opened 7 months ago
@dawsers thanks for adding the base support! It doesn't do exactly what I wanted, though, so I added this to the configs:
{
...
follow_url_func = function(url)
local abs_file_url = string.match(url, "file:(.+)")
if abs_file_url ~= nil then
vim.fn.execute("edit " .. abs_file_url)
else
vim.fn.jobstart({ "xdg-open", url })
end
end,
...
}
This lets "gf" (along with the gf passthrough) open file links directly in neovim. Thought I'd add this here for anyone who's trying to get this working.
🚀 The feature, motivation and pitch
Obsidian has a feature to absolute link files
[Text](file:///path/to/any/file.txt)
that can then be opened up and edited. It would allow linkage to files outside the vault that are within their own organizational structure (such as tex files for papers and presentations).Alternatives
No response
Additional context