mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
feat(rocks): use hererocks to install luarocks when luarocks is not found
This commit is contained in:
parent
dea1f687fe
commit
d87da76679
5 changed files with 58 additions and 2 deletions
|
@ -112,6 +112,32 @@ local function _load()
|
|||
Util.track()
|
||||
end
|
||||
|
||||
---@return LazyPluginSpec?, string?
|
||||
function M.hererocks()
|
||||
if not (Config.options.rocks.enabled and Config.options.rocks.hererocks) then
|
||||
return
|
||||
end
|
||||
|
||||
local root = Config.options.rocks.root .. "/hererocks"
|
||||
|
||||
local cmd = {
|
||||
"python",
|
||||
"hererocks.py",
|
||||
"--verbose",
|
||||
"-l",
|
||||
"5.1",
|
||||
"-r",
|
||||
"latest",
|
||||
root,
|
||||
}
|
||||
|
||||
return {
|
||||
"luarocks/hererocks",
|
||||
lazy = true,
|
||||
build = table.concat(cmd, " "),
|
||||
}, root
|
||||
end
|
||||
|
||||
---@param dir string
|
||||
---@return LazyPkg?
|
||||
---@overload fun():LazyPkg[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue