refactor: moved all plugin state to Plugin._

This commit is contained in:
Folke Lemaitre 2022-11-28 11:19:50 +01:00
parent 352dbadcb6
commit 28af1e1ac3
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
9 changed files with 49 additions and 46 deletions

View file

@ -6,7 +6,7 @@ local M = {}
M.run = {
needed = function(plugin)
return plugin.dirty and (plugin.opt == false or plugin.run)
return plugin._.dirty and (plugin.opt == false or plugin.run)
end,
run = function(self)
Loader.load(self.plugin, { task = "run" }, { load_start = true })
@ -47,13 +47,13 @@ M.clean = {
vim.loop.fs_unlink(dir)
end
self.plugin.installed = false
self.plugin._.installed = false
end,
}
M.docs = {
needed = function(plugin)
return plugin.dirty
return plugin._.dirty
end,
run = function(self)
local docs = self.plugin.dir .. "/doc/"