mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-20 05:16:45 +00:00
feat: spec.rocks is no longer needed & added support for installing any luarock
This commit is contained in:
parent
66249054c4
commit
73ea05feda
10 changed files with 120 additions and 235 deletions
|
@ -226,9 +226,6 @@ M.mapleader = nil
|
|||
---@type string
|
||||
M.maplocalleader = nil
|
||||
|
||||
---@type {specs:string, tree:string, path:string, cpath:string}
|
||||
M.rocks = {}
|
||||
|
||||
function M.headless()
|
||||
return #vim.api.nvim_list_uis() == 0
|
||||
end
|
||||
|
@ -279,17 +276,6 @@ function M.setup(opts)
|
|||
M.mapleader = vim.g.mapleader
|
||||
M.maplocalleader = vim.g.maplocalleader
|
||||
|
||||
M.rocks = {
|
||||
specs = M.options.rocks.root .. "/specs",
|
||||
tree = M.options.rocks.root .. "/tree",
|
||||
path = M.options.rocks.root .. "/tree/share/lua/5.1",
|
||||
cpath = M.options.rocks.root .. "/tree/lib/lua/5.1",
|
||||
}
|
||||
vim.fn.mkdir(M.rocks.specs, "p")
|
||||
vim.fn.mkdir(M.rocks.tree, "p")
|
||||
package.path = package.path .. ";" .. M.rocks.path .. "/?.lua;" .. M.rocks.path .. "/?/init.lua;"
|
||||
package.cpath = package.cpath .. ";" .. M.rocks.cpath .. "/?." .. (jit.os:find("Windows") and "dll" or "so") .. ";"
|
||||
|
||||
if M.headless() then
|
||||
require("lazy.view.commands").setup()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue