Skip to content

Commit

Permalink
feat(health): show steps to get luarocks working. See #1570
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 27, 2024
1 parent 8227632 commit c0fd59b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lua/lazy/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,21 @@ function M.check()

info("you have some plugins that require `luarocks`:\n" .. table.concat(lines, "\n"))
end
require("lazy.pkg.rockspec").check({
local ok = require("lazy.pkg.rockspec").check({
error = #need_luarocks > 0 and error or warn,
warn = warn,
ok = ok,
})
if not ok then
warn(table.concat({
"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`"
or " - enable `hererocks` with `opts.rocks.hererocks = true`",
" - disable `luarocks` support completely with `opts.rocks.enabled = false`",
}, "\n"))
end
else
ok("luarocks disabled")
end
Expand Down

0 comments on commit c0fd59b

Please sign in to comment.