Fix 1359: nil check for version in health-check

This commit is contained in:
Stephan Seitz 2021-06-03 23:48:36 +02:00 committed by Thomas Vigouroux
parent 99ea1fc22a
commit ee2266993b

View file

@ -26,7 +26,10 @@ local function install_health()
local result = handle:read("*a")
handle:close()
local version = vim.split(result,'\n')[1]:match('[^tree%psitter].*')
health_ok('`tree-sitter` found '..version..' (parser generator, only needed for :TSInstallFromGrammar)')
health_ok(
"`tree-sitter` found " ..
(version or "(unknown version)") .. " (parser generator, only needed for :TSInstallFromGrammar)"
)
end
if fn.executable('node') == 0 then