From 83e44088170ef9e7b19c930194d45a4c941a7da4 Mon Sep 17 00:00:00 2001 From: notomo Date: Thu, 10 Aug 2023 09:18:15 +0900 Subject: [PATCH] Fix option field type --- doc/waitevent.nvim.txt | 10 +++++----- lua/waitevent/init.lua | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/waitevent.nvim.txt b/doc/waitevent.nvim.txt index 025c8ce..8034232 100644 --- a/doc/waitevent.nvim.txt +++ b/doc/waitevent.nvim.txt @@ -32,11 +32,11 @@ WaiteventOpenContext *WaiteventOpenContext* WaiteventEditorOption *WaiteventEditorOption* -- {open} (fun(ctx:WaiteventOpenContext,...:string)) function that be called to open files -- {done_events} (string[]) autocmd events that treated as done -- {on_done} (fun(ctx:WaiteventContext)) function that called on done editor. |WaiteventContext| -- {cancel_events} (string[]) autocmd events that treated as cancel -- {on_canceled} (fun(ctx:WaiteventContext)) function that called on canceled editor. |WaiteventContext| +- {open} (fun(ctx:WaiteventOpenContext,...:string)?) function that be called to open files +- {done_events} (string[]?) autocmd events that treated as done +- {on_done} (fun(ctx:WaiteventContext)?) function that called on done editor. |WaiteventContext| +- {cancel_events} (string[]?) autocmd events that treated as cancel +- {on_canceled} (fun(ctx:WaiteventContext)?) function that called on canceled editor. |WaiteventContext| WaiteventContext *WaiteventContext* diff --git a/lua/waitevent/init.lua b/lua/waitevent/init.lua index 88d61a8..4912a67 100644 --- a/lua/waitevent/init.lua +++ b/lua/waitevent/init.lua @@ -7,11 +7,11 @@ local M = {} --- @field stdin string if stdin exists, it is not empty. |--| --- @class WaiteventEditorOption ---- @field open fun(ctx:WaiteventOpenContext,...:string) function that be called to open files ---- @field done_events string[] autocmd events that treated as done ---- @field on_done fun(ctx:WaiteventContext) function that called on done editor. |WaiteventContext| ---- @field cancel_events string[] autocmd events that treated as cancel ---- @field on_canceled fun(ctx:WaiteventContext) function that called on canceled editor. |WaiteventContext| +--- @field open fun(ctx:WaiteventOpenContext,...:string)? function that be called to open files +--- @field done_events string[]? autocmd events that treated as done +--- @field on_done fun(ctx:WaiteventContext)? function that called on done editor. |WaiteventContext| +--- @field cancel_events string[]? autocmd events that treated as cancel +--- @field on_canceled fun(ctx:WaiteventContext)? function that called on canceled editor. |WaiteventContext| --- @class WaiteventContext --- @field window_id_before_open integer: |window-ID| before |WaiteventEditorOption|.open