mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat: plugins no longer need to be installed under site/pack/*/opt
This commit is contained in:
parent
37c7366ab0
commit
dbe2d0942a
6 changed files with 14 additions and 20 deletions
|
@ -147,7 +147,7 @@ end
|
|||
function M.update_state()
|
||||
---@type table<string,FileType>
|
||||
local installed = {}
|
||||
Util.ls(Config.root, function(_, name, type)
|
||||
Util.ls(Config.options.root, function(_, name, type)
|
||||
if type == "directory" or type == "link" then
|
||||
installed[name] = type
|
||||
end
|
||||
|
@ -169,7 +169,7 @@ function M.update_state()
|
|||
plugin.dir = plugin.uri
|
||||
plugin._.installed = true -- user should make sure the directory exists
|
||||
else
|
||||
plugin.dir = Config.root .. "/" .. plugin.name
|
||||
plugin.dir = Config.options.root .. "/" .. plugin.name
|
||||
plugin._.installed = installed[plugin.name] ~= nil
|
||||
installed[plugin.name] = nil
|
||||
end
|
||||
|
@ -179,7 +179,7 @@ function M.update_state()
|
|||
for pack, dir_type in pairs(installed) do
|
||||
table.insert(Config.to_clean, {
|
||||
name = pack,
|
||||
dir = Config.root .. "/" .. pack,
|
||||
dir = Config.options.root .. "/" .. pack,
|
||||
_ = {
|
||||
installed = true,
|
||||
is_symlink = dir_type == "link",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue