aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-08-22 18:26:35 -0700
committerJustin M. Keyes <justinkz@gmail.com>2021-09-09 06:09:33 -0700
commit69fe427df408bc404b17d13759b2e925819c8cf7 (patch)
tree44129cb1c2b3ae27588c42452c647ec634b4877b /runtime/doc/lua.txt
parent4eb1ebbcf703d0b7fe7dcb8d75001878a50fc137 (diff)
downloadrneovim-69fe427df408bc404b17d13759b2e925819c8cf7.tar.gz
rneovim-69fe427df408bc404b17d13759b2e925819c8cf7.tar.bz2
rneovim-69fe427df408bc404b17d13759b2e925819c8cf7.zip
feat(lua)!: register_keystroke_callback => on_key
Analogous to nodejs's `on('data', …)` interface, here on_key is the "add listener" interface. ref 3ccdbc570d85 #12536 BREAKING_CHANGE: vim.register_keystroke_callback() is now an error.
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt31
1 files changed, 0 insertions, 31 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index a44b2e42f5..bf063ca69f 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1243,37 +1243,6 @@ region({bufnr}, {pos1}, {pos2}, {regtype}, {inclusive}) *vim.region()*
Return: ~
region lua table of the form {linenr = {startcol,endcol}}
- *vim.register_keystroke_callback()*
-register_keystroke_callback({fn}, {ns_id})
- Register a lua {fn} with an {id} to be run after every
- keystroke.
-
- If {fn} is nil, it removes the callback for the associated
- {ns_id}
- Note:
- {fn} will not be cleared from |nvim_buf_clear_namespace()|
-
- Note:
- {fn} will receive the keystrokes after mappings have been
- evaluated
-
- Parameters: ~
- {fn} function: Function to call. It should take one
- argument, which is a string. The string will contain
- the literal keys typed. See |i_CTRL-V|
- {ns_id} number? Namespace ID. If not passed or 0, will
- generate and return a new namespace ID from
- |nvim_create_namesapce()|
-
- Return: ~
- number Namespace ID associated with {fn}
-
- Note:
- {fn} will be automatically removed if an error occurs
- while calling. This is to prevent the annoying situation
- of every keystroke erroring while trying to remove a
- broken callback.
-
schedule_wrap({cb}) *vim.schedule_wrap()*
Defers callback `cb` until the Nvim API is safe to call.