mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Loosen the version check condition
Other version of nvim can still run this config, but should use with care.
This commit is contained in:
parent
8a1b3193a4
commit
cc4688d089
6
init.lua
6
init.lua
@ -11,7 +11,6 @@
|
|||||||
-- StackOverflow: https://stackoverflow.com/users/6064933/jdhao
|
-- StackOverflow: https://stackoverflow.com/users/6064933/jdhao
|
||||||
vim.loader.enable()
|
vim.loader.enable()
|
||||||
|
|
||||||
local api = vim.api
|
|
||||||
local version = vim.version
|
local version = vim.version
|
||||||
|
|
||||||
-- check if we have the latest stable version of nvim
|
-- 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
|
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 _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)
|
local msg = string.format("Expect nvim %s, but got %s instead. Use at your own risk!", expected_ver, _ver)
|
||||||
api.nvim_err_writeln(msg)
|
vim.api.nvim_err_writeln(msg)
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local core_conf_files = {
|
local core_conf_files = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user