Skip to content

Commit c95039b

Browse files
dam9000chrisdd2
authored andcommitted
fix: checkhealth reported nvim version (nvim-lua#685)
1 parent 7af210a commit c95039b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lua/kickstart/health.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
--]]
77

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

1415
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
15-
vim.health.ok(string.format("Neovim version is: '%s'", tostring(vim.version())))
16+
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
1617
else
17-
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", tostring(vim.version())))
18+
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
1819
end
1920
end
2021

0 commit comments

Comments
 (0)