fix: check against 0.9.5

This commit is contained in:
ShaolunWang 2024-07-24 12:48:51 +01:00
parent 2364a971d4
commit 1af5a7e699

View file

@ -1,12 +1,17 @@
local library_path = (function()
local root = string.sub(debug.getinfo(1).source, 2, #"/libivy.lua" * -1)
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
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"
else
is_windows = vim.loop.os_uname().sysname == "Windows_NT"
end
if is_windows then
return package.searchpath("ivyrs", release_path .. "/?.dll;")
else