mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-11-05 17:01:16 +00:00
feat(loader): handle hyphens in file names when deactivating
## Description When deactivating plugins `vim.g.loaded_` variables are cleared based on a common pattern plugins use to use avoid multiple initializing. The current logic handles most cases, except when a lua file has a hyphen in which case it is unlikely to clear the correct variable.
This commit is contained in:
parent
e6a8824858
commit
28fb0f37de
1 changed files with 1 additions and 1 deletions
|
|
@ -238,7 +238,7 @@ function M.deactivate(plugin)
|
|||
-- clear vim.g.loaded_ for plugins
|
||||
Util.ls(plugin.dir .. "/plugin", function(_, name, type)
|
||||
if type == "file" then
|
||||
vim.g["loaded_" .. name:gsub("%..*", "")] = nil
|
||||
vim.g["loaded_" .. name:gsub("%..*", ""):gsub("-", "_")] = nil
|
||||
end
|
||||
end)
|
||||
-- set as not loaded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue