perf(rocks): vim.fn.executable is slow on WSL2, so only check for luarocks when needed. Closes #1585

This commit is contained in:
Folke Lemaitre 2024-06-29 11:44:31 +02:00
parent 8dd947fccd
commit 9ab3061690
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 21 additions and 11 deletions

View file

@ -125,7 +125,7 @@ function M.check()
start("luarocks")
if Config.options.rocks.enabled then
if Config.options.rocks.hererocks then
if Config.hererocks() then
info("checking `hererocks` installation")
else
info("checking `luarocks` installation")
@ -155,7 +155,7 @@ function M.check()
"Lazy won't be able to install plugins that require `luarocks`.",
"Here's what you can do:",
" - fix your `luarocks` installation",
Config.options.rocks.hererocks and " - disable *hererocks* with `opts.rocks.hererocks = false`"
Config.hererocks() and " - disable *hererocks* with `opts.rocks.hererocks = false`"
or " - enable `hererocks` with `opts.rocks.hererocks = true`",
" - disable `luarocks` support completely with `opts.rocks.enabled = false`",
}, "\n"))