mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-24 09:49:07 +02:00
feat(plugin): added support for virtual plugins. Closes #1836
This commit is contained in:
parent
3388a26417
commit
ee64abc76b
5 changed files with 14 additions and 5 deletions
|
@ -237,12 +237,14 @@ function M.update_state()
|
|||
or plugin.cmd
|
||||
plugin.lazy = lazy and true or false
|
||||
end
|
||||
if plugin.dir:find(Config.options.root, 1, true) == 1 then
|
||||
if plugin.virtual then
|
||||
plugin._.is_local = true
|
||||
plugin._.installed = true -- local plugins are managed by the user
|
||||
elseif plugin.dir:find(Config.options.root, 1, true) == 1 then
|
||||
plugin._.installed = installed[plugin.name] ~= nil
|
||||
installed[plugin.name] = nil
|
||||
else
|
||||
plugin._.is_local = true
|
||||
plugin._.installed = true -- local plugins are managed by the user
|
||||
plugin._.installed = vim.fn.isdirectory(plugin.dir) == 1
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue