Skip to content

Commit

Permalink
feat(hop): feed wslview with decoded link
Browse files Browse the repository at this point in the history
  • Loading branch information
champignoom authored and vhyrro committed Nov 13, 2023
1 parent 5509079 commit c3b9653
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/neorg/modules/core/esupports/hop/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,17 @@ module.public = {
o.command = "rundll32.exe"
o.args = { "url.dll,FileProtocolHandler", link_location }
else
o.args = { link_location }
if config.os_info == "linux" then
o.command = "xdg-open"
elseif config.os_info == "mac" then
o.command = "open"
elseif config.os_info == "wsl2" then
o.command = "wslview"
o.args[1] = vim.uri_to_fname(link_location)
elseif config.os_info == "wsl" then
o.command = "explorer.exe"
end
o.args = { link_location }
end

require("plenary.job"):new(o):start()
Expand Down

0 comments on commit c3b9653

Please sign in to comment.