refactor: moved plugin handler types to plugin

This commit is contained in:
Folke Lemaitre 2022-12-06 10:36:31 +01:00
parent be509c01f9
commit 0393e524e5
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
2 changed files with 11 additions and 11 deletions

View File

@ -1,11 +1,5 @@
local Config = require("lazy.core.config") local Config = require("lazy.core.config")
---@class LazyPluginHandlers: table<LazyHandlerTypes, string|string[]>
---@field event? string|string[]
---@field cmd? string|string[]
---@field ft? string|string[]
---@field keys? string|string[]
---@class LazyHandler ---@class LazyHandler
---@field type LazyHandlerTypes ---@field type LazyHandlerTypes
---@field extends? LazyHandler ---@field extends? LazyHandler

View File

@ -4,11 +4,6 @@ local Handler = require("lazy.core.handler")
local M = {} local M = {}
---@class LazyPluginHooks
---@field init? fun(LazyPlugin) Will always be run
---@field config? fun(LazyPlugin) Will be executed when loading the plugin
---@field build? string|fun(LazyPlugin)
---@class LazyPluginState ---@class LazyPluginState
---@field loaded? {[string]:string}|{time:number} ---@field loaded? {[string]:string}|{time:number}
---@field installed boolean ---@field installed boolean
@ -20,6 +15,17 @@ local M = {}
---@field cloned? boolean ---@field cloned? boolean
---@field dep? boolean True if this plugin is only in the spec as a dependency ---@field dep? boolean True if this plugin is only in the spec as a dependency
---@class LazyPluginHooks
---@field init? fun(LazyPlugin) Will always be run
---@field config? fun(LazyPlugin) Will be executed when loading the plugin
---@field build? string|fun(LazyPlugin)
---@class LazyPluginHandlers: table<LazyHandlerTypes, string|string[]>
---@field event? string|string[]
---@field cmd? string|string[]
---@field ft? string|string[]
---@field keys? string|string[]
---@class LazyPluginRef ---@class LazyPluginRef
---@field branch? string ---@field branch? string
---@field tag? string ---@field tag? string