2022-12-27 07:30:28 +00:00
|
|
|
|
2023-01-03 09:43:10 +00:00
|
|
|
---@alias LazyPluginKind "normal"|"clean"|"disabled"
|
2022-12-27 07:30:28 +00:00
|
|
|
|
|
|
|
---@class LazyPluginState
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field cache? table<string,any>
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field cloned? boolean
|
|
|
|
---@field cond? boolean
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field dep? boolean True if this plugin is only in the spec as a dependency
|
2023-10-15 07:36:15 +01:00
|
|
|
---@field dir? string Explicit dir or dev set for this plugin
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field dirty? boolean
|
|
|
|
---@field frags? number[]
|
2023-10-16 21:34:44 +01:00
|
|
|
---@field handlers? LazyPluginHandlers
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field installed? boolean
|
|
|
|
---@field is_local? boolean
|
|
|
|
---@field kind? LazyPluginKind
|
|
|
|
---@field loaded? {[string]:string}|{time:number}
|
|
|
|
---@field outdated? boolean
|
2024-06-18 18:39:47 +01:00
|
|
|
---@field rocks? LazyRock[]
|
|
|
|
---@field rocks_installed? boolean
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field rtp_loaded? boolean
|
|
|
|
---@field tasks? LazyTask[]
|
|
|
|
---@field updated? {from:string, to:string}
|
|
|
|
---@field updates? {from:GitInfo, to:GitInfo}
|
|
|
|
---@field working? boolean
|
2022-12-27 07:30:28 +00:00
|
|
|
|
2023-01-08 14:01:49 +00:00
|
|
|
---@alias PluginOpts table|fun(self:LazyPlugin, opts:table):table?
|
|
|
|
|
2022-12-27 07:30:28 +00:00
|
|
|
---@class LazyPluginHooks
|
2023-01-08 14:01:49 +00:00
|
|
|
---@field init? fun(self:LazyPlugin) Will always be run
|
2023-02-07 22:52:02 +00:00
|
|
|
---@field deactivate? fun(self:LazyPlugin) Unload/Stop a plugin
|
2023-01-08 14:01:49 +00:00
|
|
|
---@field config? fun(self:LazyPlugin, opts:table)|true Will be executed when loading the plugin
|
|
|
|
---@field build? string|fun(self:LazyPlugin)|(string|fun(self:LazyPlugin))[]
|
|
|
|
---@field opts? PluginOpts
|
2022-12-27 07:30:28 +00:00
|
|
|
|
2023-10-17 07:36:09 +01:00
|
|
|
---@class LazyPluginHandlers
|
2023-10-16 21:34:44 +01:00
|
|
|
---@field event? table<string,LazyEvent>
|
|
|
|
---@field ft? table<string,LazyEvent>
|
|
|
|
---@field keys? table<string,LazyKeys>
|
|
|
|
---@field cmd? table<string,string>
|
2022-12-27 07:30:28 +00:00
|
|
|
|
|
|
|
---@class LazyPluginRef
|
|
|
|
---@field branch? string
|
|
|
|
---@field tag? string
|
|
|
|
---@field commit? string
|
2024-03-24 10:30:00 +00:00
|
|
|
---@field version? string|boolean
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field pin? boolean
|
2023-02-12 11:56:42 +00:00
|
|
|
---@field submodules? boolean Defaults to true
|
2022-12-27 07:30:28 +00:00
|
|
|
|
|
|
|
---@class LazyPluginBase
|
|
|
|
---@field [1] string?
|
|
|
|
---@field name string display name and name used for plugin config files
|
2023-02-07 22:52:02 +00:00
|
|
|
---@field main? string Entry module that has setup & deactivate
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field url string?
|
|
|
|
---@field dir string
|
|
|
|
---@field enabled? boolean|(fun():boolean)
|
|
|
|
---@field cond? boolean|(fun():boolean)
|
2023-05-22 13:53:30 +01:00
|
|
|
---@field optional? boolean If set, then this plugin will not be added unless it is added somewhere else
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field lazy? boolean
|
2022-12-27 16:24:40 +00:00
|
|
|
---@field priority? number Only useful for lazy=false plugins to force loading certain plugins first. Default priority is 50
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field dev? boolean If set, then link to the respective folder under your ~/projects
|
2024-06-18 18:39:47 +01:00
|
|
|
---@field rocks? string[]
|
2022-12-27 07:30:28 +00:00
|
|
|
|
|
|
|
---@class LazyPlugin: LazyPluginBase,LazyPluginHandlers,LazyPluginHooks,LazyPluginRef
|
|
|
|
---@field dependencies? string[]
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field specs? string|string[]|LazyPluginSpec[]
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field _ LazyPluginState
|
|
|
|
|
|
|
|
---@class LazyPluginSpecHandlers
|
2023-10-13 11:37:41 +01:00
|
|
|
---@field event? string[]|string|LazyEventSpec[]|fun(self:LazyPlugin, event:string[]):string[]
|
2023-01-12 12:07:51 +00:00
|
|
|
---@field cmd? string[]|string|fun(self:LazyPlugin, cmd:string[]):string[]
|
|
|
|
---@field ft? string[]|string|fun(self:LazyPlugin, ft:string[]):string[]
|
2024-03-07 16:27:50 +00:00
|
|
|
---@field keys? string|string[]|LazyKeysSpec[]|fun(self:LazyPlugin, keys:string[]):((string|LazyKeys)[])
|
2022-12-27 07:30:28 +00:00
|
|
|
---@field module? false
|
|
|
|
|
|
|
|
---@class LazyPluginSpec: LazyPluginBase,LazyPluginSpecHandlers,LazyPluginHooks,LazyPluginRef
|
|
|
|
---@field dependencies? string|string[]|LazyPluginSpec[]
|
2024-06-22 21:18:26 +01:00
|
|
|
---@field specs? string|string[]|LazyPluginSpec[]
|
2022-12-27 07:30:28 +00:00
|
|
|
|
2023-01-01 20:07:05 +00:00
|
|
|
---@alias LazySpec string|LazyPluginSpec|LazySpecImport|LazySpec[]
|
|
|
|
|
|
|
|
---@class LazySpecImport
|
2024-06-16 06:09:33 +01:00
|
|
|
---@field import string|(fun():LazyPluginSpec) spec module to import
|
|
|
|
---@field name? string
|
2023-01-01 20:07:05 +00:00
|
|
|
---@field enabled? boolean|(fun():boolean)
|
2023-10-06 14:46:46 +01:00
|
|
|
---@field cond? boolean|(fun():boolean)
|
2024-06-22 21:18:26 +01:00
|
|
|
|
|
|
|
---@class LazyFragment
|
|
|
|
---@field id number
|
|
|
|
---@field pid? number
|
|
|
|
---@field deps? number[]
|
|
|
|
---@field frags? number[]
|
|
|
|
---@field dep? boolean
|
|
|
|
---@field name string
|
|
|
|
---@field url? string
|
|
|
|
---@field dir? string
|
|
|
|
---@field spec LazyPlugin
|