mirror of https://github.com/folke/lazy.nvim.git
refactor: Task.needed => task.skip
This commit is contained in:
parent
3768256956
commit
16fd35c285
|
@ -1,7 +1,7 @@
|
||||||
local Process = require("lazy.manage.process")
|
local Process = require("lazy.manage.process")
|
||||||
|
|
||||||
---@class LazyTaskDef
|
---@class LazyTaskDef
|
||||||
---@field needed? fun(plugin:LazyPlugin, opts:RunnerOpts):any?
|
---@field skip? fun(plugin:LazyPlugin, opts:RunnerOpts):any?
|
||||||
---@field run fun(task:LazyTask)
|
---@field run fun(task:LazyTask)
|
||||||
|
|
||||||
---@alias LazyTaskState fun():boolean?
|
---@alias LazyTaskState fun():boolean?
|
||||||
|
|
|
@ -5,8 +5,8 @@ local Loader = require("lazy.core.loader")
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.run = {
|
M.run = {
|
||||||
needed = function(plugin)
|
skip = function(plugin)
|
||||||
return plugin._.dirty and (plugin.opt == false or plugin.run)
|
return not (plugin._.dirty and (plugin.opt == false or plugin.run))
|
||||||
end,
|
end,
|
||||||
run = function(self)
|
run = function(self)
|
||||||
Loader.load(self.plugin, { task = "run" }, { load_start = true })
|
Loader.load(self.plugin, { task = "run" }, { load_start = true })
|
||||||
|
@ -52,8 +52,8 @@ M.clean = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.docs = {
|
M.docs = {
|
||||||
needed = function(plugin)
|
skip = function(plugin)
|
||||||
return plugin._.dirty
|
return not plugin._.dirty
|
||||||
end,
|
end,
|
||||||
run = function(self)
|
run = function(self)
|
||||||
local docs = self.plugin.dir .. "/doc/"
|
local docs = self.plugin.dir .. "/doc/"
|
||||||
|
|
Loading…
Reference in New Issue