aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-03-24 13:22:58 +0000
committerLewis Russell <lewis6991@gmail.com>2022-03-24 13:59:20 +0000
commit58140a94283b1c6e45099c89e66a0c94e9d90931 (patch)
tree5784df502607457f6d34c0ce7280873d59948301 /runtime/doc
parent3b28bd57f9131a71b17265d18d5e0a7a8cedb84b (diff)
downloadrneovim-58140a94283b1c6e45099c89e66a0c94e9d90931.tar.gz
rneovim-58140a94283b1c6e45099c89e66a0c94e9d90931.tar.bz2
rneovim-58140a94283b1c6e45099c89e66a0c94e9d90931.zip
feat(keymap): return nil from an expr keymap
For Lua callback expr keymaps, returning `nil` or `false` is equivalent to an empty string
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index bd821c4f9e..e5bc60a8cd 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -2007,7 +2007,9 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
create mapping on multiple modes.
{lhs} string Left-hand side |{lhs}| of the mapping.
{rhs} string|function Right-hand side |{rhs}| of the
- mapping. Can also be a Lua function.
+ mapping. Can also be a Lua function. If a Lua
+ function and `opts.expr == true`, returning `nil`
+ or `false` is equivalent to an empty string.
{opts} table A table of |:map-arguments| such as
"silent". In addition to the options listed in
|nvim_set_keymap()|, this table also accepts the