implement open_url_in_browser() for windows
This commit is contained in:
@@ -52,13 +52,14 @@ M.lsp_organize_imports = function(bufnr, timeout)
|
|||||||
end
|
end
|
||||||
|
|
||||||
M.open_url_in_browser = function(url)
|
M.open_url_in_browser = function(url)
|
||||||
-- TODO: implement windows support
|
local f
|
||||||
|
|
||||||
if vim.fn.has("win32") == 1 then
|
if vim.fn.has("win32") == 1 then
|
||||||
print("windows not supported, sorry")
|
f = io.popen("explorer " .. url, "r")
|
||||||
return
|
else
|
||||||
|
f = io.popen("xdg-open " .. url, "r")
|
||||||
end
|
end
|
||||||
|
|
||||||
local f = io.popen("xdg-open " .. url, "r")
|
|
||||||
f:close()
|
f:close()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user