commit e74753a221f82b2c7bade8c079683c19252484fe
parent 006361fc6b98a989f85f0709493f9864bdb10dfa
Author: Maria José Solano <majosolano99@gmail.com>
Date: Tue, 17 Jun 2025 06:37:27 -0700
fix(docs): callback annotation for `vim.ui.input` #34507
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
@@ -2606,10 +2606,10 @@ vim.ui.input({opts}, {on_confirm}) *vim.ui.input()*
"-complete=" argument. See |:command-completion|
• highlight (function) Function that will be used for
highlighting user inputs.
- • {on_confirm} (`function`) ((input|nil) -> ()) Called once the user
- confirms or abort the input. `input` is what the user
- typed (it might be an empty string if nothing was
- entered), or `nil` if the user aborted the dialog.
+ • {on_confirm} (`fun(input:string?)`) Called once the user confirms or
+ abort the input. `input` is what the user typed (it
+ might be an empty string if nothing was entered), or
+ `nil` if the user aborted the dialog.
vim.ui.open({path}, {opt}) *vim.ui.open()*
Opens `path` with the system default handler (macOS `open`, Windows
diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua
@@ -81,7 +81,7 @@ end
--- - highlight (function)
--- Function that will be used for highlighting
--- user inputs.
----@param on_confirm function ((input|nil) -> ())
+---@param on_confirm fun(input:string|nil)
--- Called once the user confirms or abort the input.
--- `input` is what the user typed (it might be
--- an empty string if nothing was entered), or