aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-09 06:55:35 -0700
committerGitHub <noreply@github.com>2021-09-09 06:55:35 -0700
commitd8339be6915b3640f12a1827cee652b604b1a0d7 (patch)
tree55bfaa55adfd1bc5f3babf25b63a938d211f4c40 /runtime/doc/lua.txt
parent4eb1ebbcf703d0b7fe7dcb8d75001878a50fc137 (diff)
parent9f3679cbfd8633886f1ab43cd761c58da3b8a29b (diff)
downloadrneovim-d8339be6915b3640f12a1827cee652b604b1a0d7.tar.gz
rneovim-d8339be6915b3640f12a1827cee652b604b1a0d7.tar.bz2
rneovim-d8339be6915b3640f12a1827cee652b604b1a0d7.zip
Merge #15460 feat(lua)!: register_keystroke_callback => on_key
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt35
1 files changed, 2 insertions, 33 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index a44b2e42f5..5d600eae99 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -576,11 +576,11 @@ If you want to exclude visual selections from highlighting on yank, use
vim.highlight.on_yank({opts}) *vim.highlight.on_yank()*
Highlights the yanked text. The fields of the optional dict {opts}
control the highlight:
- - {higroup} highlight group for yanked region (default `"IncSearch"`)
+ - {higroup} highlight group for yanked region (default |hl-IncSearch|)
- {timeout} time in ms before highlight is cleared (default `150`)
- {on_macro} highlight when executing macro (default `false`)
- {on_visual} highlight when yanking visual selection (default `true`)
- - {event} event structure (default `vim.v.event`)
+ - {event} event structure (default |v:event|)
vim.highlight.range({bufnr}, {ns}, {higroup}, {start}, {finish}, {rtype}, {inclusive})
*vim.highlight.range()*
@@ -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.