fix(nvim): do not display vim build version if it's not found

This commit is contained in:
Price Hiller 2023-11-30 23:45:34 -06:00
parent c5d937aedd
commit cd225b69bb
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

View File

@ -40,12 +40,19 @@ return {
type = "text",
val = function()
local version = vim.version()
if version.build ~= vim.NIL then
return ("─────── v%s.%s.%s+%s ───────"):format(
version.major,
version.minor,
version.patch,
version.build
)
end
return ("─────── v%s.%s.%s ───────"):format(
version.major,
version.minor,
version.patch
)
end,
opts = { position = "center", hl = "@boolean" },
}