mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-20 05:16:45 +00:00
perf(rocks): vim.fn.executable
is slow on WSL2, so only check for luarocks
when needed. Closes #1585
This commit is contained in:
parent
8dd947fccd
commit
9ab3061690
4 changed files with 21 additions and 11 deletions
|
@ -72,7 +72,7 @@ function M.check(opts)
|
|||
}, opts or {})
|
||||
|
||||
local ok = false
|
||||
if Config.options.rocks.hererocks then
|
||||
if Config.hererocks() then
|
||||
if M.hererocks.building() then
|
||||
ok = true
|
||||
else
|
||||
|
@ -119,7 +119,7 @@ function M.build(task)
|
|||
"",
|
||||
"This plugin requires `luarocks`. Try one of the following:",
|
||||
" - 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`",
|
||||
})
|
||||
|
@ -132,7 +132,7 @@ function M.build(task)
|
|||
|
||||
local env = {}
|
||||
local luarocks = "luarocks"
|
||||
if Config.options.rocks.hererocks then
|
||||
if Config.hererocks() then
|
||||
-- hererocks is still building, so skip for now
|
||||
-- a new build will happen in the next round
|
||||
if M.hererocks.building() then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue