fix(plugin): protect dev plugins from cleanup

Dev plugins with local directories should not be deleted during cleanup
operations, even when located within the lazy root directory. This enables
the workflow of developing plugins locally in the same location where they
would be installed from upstream.
This commit is contained in:
Arjun Mahishi 2025-08-01 11:43:58 +05:30
commit 21d076c13a

View file

@ -237,7 +237,7 @@ function M.update_state()
or plugin.cmd or plugin.cmd
plugin.lazy = lazy and true or false plugin.lazy = lazy and true or false
end end
if plugin.virtual then if plugin.virtual or (plugin.dev and plugin.dir ~= "") then
plugin._.is_local = true plugin._.is_local = true
plugin._.installed = true -- local plugins are managed by the user plugin._.installed = true -- local plugins are managed by the user
elseif plugin.dir:find(Config.options.root, 1, true) == 1 then elseif plugin.dir:find(Config.options.root, 1, true) == 1 then