feat: support windows and nvim 0.9.5
This commit is contained in:
parent
b907233876
commit
2364a971d4
1 changed files with 7 additions and 1 deletions
|
|
@ -1,7 +1,13 @@
|
|||
local library_path = (function()
|
||||
local root = string.sub(debug.getinfo(1).source, 2, #"/libivy.lua" * -1)
|
||||
local release_path = root .. "../../target/release"
|
||||
if vim.uv.os_uname().sysname == "Windows_NT" then
|
||||
local is_windows
|
||||
if vim.version() >= 0.9 then
|
||||
is_windows = vim.uv.os_uname().sysname == "Windows_NT"
|
||||
else
|
||||
is_windows = vim.loop.os_uname().sysname == "Windows_NT"
|
||||
end
|
||||
if is_windows then
|
||||
return package.searchpath("ivyrs", release_path .. "/?.dll;")
|
||||
else
|
||||
return package.searchpath("libivyrs", release_path .. "/?.so;" .. release_path .. "/?.dylib;")
|
||||
|
|
|
|||
Loading…
Reference in a new issue