mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Transition from init.vim to init.lua
This commit is contained in:
@@ -25,4 +25,23 @@ function M.may_create_dir()
|
||||
end
|
||||
end
|
||||
|
||||
function M.check_version_match()
|
||||
-- check if we have the lastest stable version of nvim
|
||||
local expected_ver = {major = 0, minor = 7, patch = 2}
|
||||
local actual_ver = vim.version()
|
||||
|
||||
local ver_match = true
|
||||
for key, val in pairs(expected_ver) do
|
||||
if val ~= actual_ver[key] then
|
||||
ver_match = false
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local expect_ver_str = string.format("%s.%s.%s", expected_ver.major, expected_ver.minor, expected_ver.patch)
|
||||
local nvim_ver_str = string.format("%s.%s.%s", actual_ver.major, actual_ver.minor, actual_ver.patch)
|
||||
|
||||
return {match=ver_match, expected=expect_ver_str, actual=nvim_ver_str}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user