fix: check against 0.9.5
This commit is contained in:
parent
2364a971d4
commit
1af5a7e699
1 changed files with 6 additions and 1 deletions
|
|
@ -1,12 +1,17 @@
|
||||||
local library_path = (function()
|
local library_path = (function()
|
||||||
local root = string.sub(debug.getinfo(1).source, 2, #"/libivy.lua" * -1)
|
local root = string.sub(debug.getinfo(1).source, 2, #"/libivy.lua" * -1)
|
||||||
local release_path = root .. "../../target/release"
|
local release_path = root .. "../../target/release"
|
||||||
|
local current_vim_version = vim.version()
|
||||||
|
local minimum_supported_version = vim.version.parse "0.9.5"
|
||||||
|
|
||||||
local is_windows
|
local is_windows
|
||||||
if vim.version() >= 0.9 then
|
|
||||||
|
if vim.version.gt(current_vim_version, minimum_supported_version) then
|
||||||
is_windows = vim.uv.os_uname().sysname == "Windows_NT"
|
is_windows = vim.uv.os_uname().sysname == "Windows_NT"
|
||||||
else
|
else
|
||||||
is_windows = vim.loop.os_uname().sysname == "Windows_NT"
|
is_windows = vim.loop.os_uname().sysname == "Windows_NT"
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_windows then
|
if is_windows then
|
||||||
return package.searchpath("ivyrs", release_path .. "/?.dll;")
|
return package.searchpath("ivyrs", release_path .. "/?.dll;")
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue