diff options
| author | jdhao <jdhao@hotmail.com> | 2023-04-07 22:42:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-08 04:42:24 +0800 |
| commit | 644993a89e8be251c10f4d2b1bb761301f4545b1 (patch) | |
| tree | 5e796f10ad4ea784c8c733a439d64ec2f39f0011 /init.lua | |
| parent | 8746c7eb11f368efb90226f8a49eec57764ba06a (diff) | |
bump to nvim version 0.9.0 (#188)
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -11,14 +11,16 @@ -- StackOverflow: https://stackoverflow.com/users/6064933/jdhao local api = vim.api -local utils = require("utils") +local version = vim.version -- check if we have the latest stable version of nvim -local expected_ver = "0.8.3" -local nvim_ver = utils.get_nvim_version() +local expected_ver = "0.9.0" +local ev = version.parse(expected_ver) +local actual_ver = version() -if nvim_ver ~= expected_ver then - local msg = string.format("Unsupported nvim version: expect %s, but got %s instead!", expected_ver, nvim_ver) +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 end |
