use "wslview" instead of "xsl-open" if it exsits

This commit is contained in:
kyoh86 2023-02-08 13:48:00 +09:00
commit 79f07c597d
No known key found for this signature in database
GPG key ID: 106F27E5F736475C

View file

@ -25,6 +25,8 @@ function M.open(uri)
else else
if vim.fn.executable("xdg-open") then if vim.fn.executable("xdg-open") then
cmd = { "xdg-open", uri } cmd = { "xdg-open", uri }
elseif vim.fn.executable("wslview") then
cmd = { "wslview", uri }
else else
cmd = { "open", uri } cmd = { "open", uri }
end end