aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2023-09-01 21:36:56 +0200
committerjdhao <jdhao@hotmail.com>2023-09-01 21:39:08 +0200
commitcc4688d089b9650d586697a0738be75559212865 (patch)
tree7921f0475eedd8aedec8feabb28b6a324ef46678
parent8a1b3193a4def30b2181d319f476cb31b3bcb8df (diff)
Loosen the version check condition
Other version of nvim can still run this config, but should use with care.
-rw-r--r--init.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/init.lua b/init.lua
index d3c0534..8524f45 100644
--- a/init.lua
+++ b/init.lua
@@ -11,7 +11,6 @@
-- StackOverflow: https://stackoverflow.com/users/6064933/jdhao
vim.loader.enable()
-local api = vim.api
local version = vim.version
-- check if we have the latest stable version of nvim
@@ -21,9 +20,8 @@ local actual_ver = version()
if version.cmp(ev, actual_ver) ~= 0 then
local _ver = string.format("%s.%s.%s", actual_ver.major, actual_ver.minor, actual_ver.patch)
- local msg = string.format("Unsupported nvim version: expect %s, but got %s instead!", expected_ver, _ver)
- api.nvim_err_writeln(msg)
- return
+ local msg = string.format("Expect nvim %s, but got %s instead. Use at your own risk!", expected_ver, _ver)
+ vim.api.nvim_err_writeln(msg)
end
local core_conf_files = {