From 0393e524e5c2e373483896efbc3730af17c3bf73 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 6 Dec 2022 10:36:31 +0100 Subject: [PATCH] refactor: moved plugin handler types to plugin --- lua/lazy/core/handler/init.lua | 6 ------ lua/lazy/core/plugin.lua | 16 +++++++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/lazy/core/handler/init.lua b/lua/lazy/core/handler/init.lua index be229c1..fc023ef 100644 --- a/lua/lazy/core/handler/init.lua +++ b/lua/lazy/core/handler/init.lua @@ -1,11 +1,5 @@ local Config = require("lazy.core.config") ----@class LazyPluginHandlers: table ----@field event? string|string[] ----@field cmd? string|string[] ----@field ft? string|string[] ----@field keys? string|string[] - ---@class LazyHandler ---@field type LazyHandlerTypes ---@field extends? LazyHandler diff --git a/lua/lazy/core/plugin.lua b/lua/lazy/core/plugin.lua index ddbdb72..f98198a 100644 --- a/lua/lazy/core/plugin.lua +++ b/lua/lazy/core/plugin.lua @@ -4,11 +4,6 @@ local Handler = require("lazy.core.handler") 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 ---@field loaded? {[string]:string}|{time:number} ---@field installed boolean @@ -20,6 +15,17 @@ local M = {} ---@field cloned? boolean ---@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 +---@field event? string|string[] +---@field cmd? string|string[] +---@field ft? string|string[] +---@field keys? string|string[] + ---@class LazyPluginRef ---@field branch? string ---@field tag? string