Skip to content

Commit

Permalink
feat(esupports): use wslview to open wsl2 files (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
champignoom committed Sep 2, 2023
1 parent c9dd9f7 commit 20502e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/neorg/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ local function os_info()
if f ~= nil then
local version = f:read("*all")
f:close()
if version:find("microsoft") then
if version:find("WSL2") then
return "wsl2"
elseif version:find("microsoft") then
return "wsl"
end
end
Expand Down
2 changes: 2 additions & 0 deletions lua/neorg/modules/core/esupports/hop/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ module.public = {
o.command = "xdg-open"
elseif config.os_info == "mac" then
o.command = "open"
elseif config.os_info == "wsl2" then
o.command = "wslview"
elseif config.os_info == "wsl" then
o.command = "explorer.exe"
end
Expand Down

0 comments on commit 20502e5

Please sign in to comment.