mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-08-20 00:01:02 +00:00
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:
parent
6c3bda4aca
commit
21d076c13a
1 changed files with 1 additions and 1 deletions
|
@ -237,7 +237,7 @@ function M.update_state()
|
|||
or plugin.cmd
|
||||
plugin.lazy = lazy and true or false
|
||||
end
|
||||
if plugin.virtual then
|
||||
if plugin.virtual or (plugin.dev and plugin.dir ~= "") 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue