aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Marriott <hello@omarriott.com>2023-09-21 22:34:56 +1000
committerOliver Marriott <hello@omarriott.com>2023-09-23 01:54:24 +1000
commit44f698bb1afccb90fd8835fa7e35bfcebbd6d828 (patch)
tree71547268a9cbbd03e3b76f9224789525dacd86b1
parentf413597f44f62a62675a3a7149e34a63f16e4821 (diff)
downloadrneovim-44f698bb1afccb90fd8835fa7e35bfcebbd6d828.tar.gz
rneovim-44f698bb1afccb90fd8835fa7e35bfcebbd6d828.tar.bz2
rneovim-44f698bb1afccb90fd8835fa7e35bfcebbd6d828.zip
docs: update vim.schedule param name and type
Per https://github.com/neovim/neovim/pull/25286#discussion_r1332861721 and https://github.com/neovim/neovim/pull/25286#discussion_r1334318352
-rw-r--r--runtime/doc/lua.txt8
-rw-r--r--runtime/lua/vim/_meta/builtin.lua6
2 files changed, 7 insertions, 7 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 14df45cc8c..ddf11fd966 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -956,12 +956,12 @@ vim.rpcrequest({channel}, {method}, {args}, {...}) *vim.rpcrequest()*
• {args} any[]|nil
• {...} any|nil
-vim.schedule({callback}) *vim.schedule()*
- Schedules {callback} to be invoked soon by the main event-loop. Useful to
- avoid |textlock| or other temporary restrictions.
+vim.schedule({fn}) *vim.schedule()*
+ Schedules {fn} to be invoked soon by the main event-loop. Useful to avoid
+ |textlock| or other temporary restrictions.
Parameters: ~
- • {callback} fun()
+ • {fn} (function)
vim.str_byteindex({str}, {index}, {use_utf16}) *vim.str_byteindex()*
Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not
diff --git a/runtime/lua/vim/_meta/builtin.lua b/runtime/lua/vim/_meta/builtin.lua
index 0a6dd3e151..92c23f7764 100644
--- a/runtime/lua/vim/_meta/builtin.lua
+++ b/runtime/lua/vim/_meta/builtin.lua
@@ -194,10 +194,10 @@ function vim.str_utfindex(str, index) end
--- @return string|nil Converted string if conversion succeeds, `nil` otherwise.
function vim.iconv(str, from, to, opts) end
---- Schedules {callback} to be invoked soon by the main event-loop. Useful
+--- Schedules {fn} to be invoked soon by the main event-loop. Useful
--- to avoid |textlock| or other temporary restrictions.
---- @param callback fun()
-function vim.schedule(callback) end
+--- @param fn function
+function vim.schedule(fn) end
--- Wait for {time} in milliseconds until {callback} returns `true`.
---