From a1d34cdf78c9c82bdaf35bb306c70c95575b1d01 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Wed, 28 Aug 2024 21:35:21 +0200 Subject: [PATCH] fix(vimdoc): missing lz.n.State field --- doc/lz.n.txt | 13 ++++++++----- lua/lz/n/handler/state.lua | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/lz.n.txt b/doc/lz.n.txt index 08022b9..4b03992 100644 --- a/doc/lz.n.txt +++ b/doc/lz.n.txt @@ -241,13 +241,16 @@ lz.n.handler.State *lz.n.handler.State* Fields: ~ {insert} (fun(key:string,plugin:lz.n.Plugin)|fun(plugin:lz.n.Plugin)) - Insert a plugin (optionally, by key). + Insert a plugin (optionally, by key). {del} (fun(plugin_name:string,callback?:fun(key:string))) - Remove a plugin by its name. + Remove a plugin by its name. {has_pending_plugins} (fun(key?:string):boolean) - Check if there are pending plugins (optionally, by key) - {lookup_plugin} (fun(plugin_name:string):lz.n.Plugin) - Lookup a plugin by its name. + Check if there are pending plugins (optionally, by key) + {lookup_plugin} (fun(plugin_name:string):lz.n.Plugin|nil) + Lookup a plugin by its name. + {each_pending} (fun(key:string,callback:fun(plugin:lz.n.Plugin)):string[]|fun(callback:fun(plugin:lz.n.Plugin)):string[]) + Safely apply a callback to all pending plugins + (optionally, by key). vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/lua/lz/n/handler/state.lua b/lua/lz/n/handler/state.lua index d99f543..027e2ca 100644 --- a/lua/lz/n/handler/state.lua +++ b/lua/lz/n/handler/state.lua @@ -95,7 +95,7 @@ end ---@field has_pending_plugins fun(key?: string):boolean --- ---Lookup a plugin by its name. ----@field lookup_plugin fun(plugin_name: string):lz.n.Plugin? +---@field lookup_plugin fun(plugin_name: string):(lz.n.Plugin | nil) --- ---Safely apply a callback to all pending plugins ---(optionally, by key).