aboutsummaryrefslogtreecommitdiff
path: root/lua/muwiki/links.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/muwiki/links.lua')
-rw-r--r--lua/muwiki/links.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/lua/muwiki/links.lua b/lua/muwiki/links.lua
index 5bcdc68..90b9349 100644
--- a/lua/muwiki/links.lua
+++ b/lua/muwiki/links.lua
@@ -12,8 +12,6 @@ local function get_link_type(target)
return 'wiki'
end
-
-
function M.get_link()
local cursor = vim.api.nvim_win_get_cursor(0)
@@ -76,7 +74,7 @@ function M.open_link()
end
if link.type == 'web' then
- vim.system({'xdg-open', link.target}, {detach = true})
+ vim.system({ 'xdg-open', link.target }, { detach = true })
return
end
@@ -88,7 +86,7 @@ function M.open_link()
if link.type == 'file' then
if vim.startswith(link.target, 'file://') then
local file_path = utils.resolve(link.target, nil)
- vim.system({'xdg-open', file_path}, {detach = true})
+ vim.system({ 'xdg-open', file_path }, { detach = true })
else
local ok, file_path = pcall(utils.resolve, link.target, wiki_root)
if not ok then
@@ -96,7 +94,7 @@ function M.open_link()
return
end
- vim.system({'xdg-open', file_path}, {detach = true})
+ vim.system({ 'xdg-open', file_path }, { detach = true })
end
return
end