diff options
| author | jdhao <jdhao@hotmail.com> | 2023-09-01 21:36:56 +0200 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2023-09-01 21:39:08 +0200 |
| commit | cc4688d089b9650d586697a0738be75559212865 (patch) | |
| tree | 7921f0475eedd8aedec8feabb28b6a324ef46678 /init.lua | |
| parent | 8a1b3193a4def30b2181d319f476cb31b3bcb8df (diff) | |
Loosen the version check condition
Other version of nvim can still run this config, but should use with
care.
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 = { |
