diff options
author | Josh Rahm <rahm@google.com> | 2022-08-19 12:26:08 -0600 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-08-19 13:06:41 -0600 |
commit | a7237662f96933efe29eed8212464571e3778cd0 (patch) | |
tree | 27930202726b4251437c8cfa53069f65b4db90dc /runtime/lua/vim/keymap.lua | |
parent | 02292344929069ea63c0bb872cc22d552d86b67f (diff) | |
parent | b2f979b30beac67906b2dd717fcb6a34f46f5e54 (diff) | |
download | rneovim-a7237662f96933efe29eed8212464571e3778cd0.tar.gz rneovim-a7237662f96933efe29eed8212464571e3778cd0.tar.bz2 rneovim-a7237662f96933efe29eed8212464571e3778cd0.zip |
Merge branch 'master' of https://github.com/neovim/neovim into rahmtmp
Diffstat (limited to 'runtime/lua/vim/keymap.lua')
-rw-r--r-- | runtime/lua/vim/keymap.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua index 7265beb56b..219de16b5c 100644 --- a/runtime/lua/vim/keymap.lua +++ b/runtime/lua/vim/keymap.lua @@ -36,14 +36,17 @@ local keymap = {} ---@param lhs string Left-hand side |{lhs}| of the mapping. ---@param rhs string|function Right-hand side |{rhs}| of the mapping. Can also be a Lua function. -- ----@param 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 following keys: ---- - buffer: (number or boolean) Add a mapping to the given buffer. When "true" ---- or 0, use the current buffer. ---- - remap: (boolean) Make the mapping recursive. This is the ---- inverse of the "noremap" option from |nvim_set_keymap()|. ---- Default `false`. ---- - replace_keycodes: (boolean) defaults to true if "expr" is true. +---@param opts table A table of |:map-arguments|. +--- + Accepts options accepted by the {opts} parameter in |nvim_set_keymap()|, +--- with the following notable differences: +--- - replace_keycodes: Defaults to `true` if "expr" is `true`. +--- - noremap: Always overridden with the inverse of "remap" (see below). +--- + In addition to those options, the table accepts the following keys: +--- - buffer: (number or boolean) Add a mapping to the given buffer. +--- When `0` or `true`, use the current buffer. +--- - remap: (boolean) Make the mapping recursive. +--- This is the inverse of the "noremap" option from |nvim_set_keymap()|. +--- Defaults to `false`. ---@see |nvim_set_keymap()| function keymap.set(mode, lhs, rhs, opts) vim.validate({ |