From a52a362b028d83a349a311e80bb4c29fe06b0849 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sun, 14 Aug 2022 22:54:19 +0800 Subject: update version check --- init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index 9a95413..ff1d3ac 100644 --- a/init.lua +++ b/init.lua @@ -8,11 +8,14 @@ -- Email: jdhao@hotmail.com -- Blog: https://jdhao.github.io/ + -- check if we have the latest stable version of nvim +local expected_ver = "0.7.2" + local utils = require "utils" -local match_res = utils.check_version_match() +local nvim_ver = utils.get_nvim_version() -if not match_res.match then - local msg = string.format("Nvim version mistmatch: %s expected, but got %s instead!", match_res.expected, match_res.actual) +if nvim_ver ~= expected_ver then + local msg = string.format("Unsupported nvim version: expect %s, but got %s instead!", expected_ver, nvim_ver) vim.api.nvim_echo({ { msg, "ErrorMsg" } }, false, {}) return end -- cgit v1.2.3