Skip to content

Commit

Permalink
fix: checkhealth reported nvim version (nvim-lua#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
dam9000 committed Mar 4, 2024
1 parent e6710a4 commit c9122e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/kickstart/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
--]]

local check_version = function()
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
if not vim.version.cmp then
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
return
end

if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
end
end

Expand Down

0 comments on commit c9122e8

Please sign in to comment.