aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2022-12-14 19:58:18 +0100
committerJustin M. Keyes <justinkz@gmail.com>2023-02-22 16:23:49 +0100
commit6752f1005d26c93a033d856a60b7b296f3e51634 (patch)
tree5681d87457d1409b848947efc637dcc8eced2a81 /src/nvim/api/vim.c
parent0b36145c696fb58e002169edd4f9a1d9a8176fc3 (diff)
downloadrneovim-6752f1005d26c93a033d856a60b7b296f3e51634.tar.gz
rneovim-6752f1005d26c93a033d856a60b7b296f3e51634.tar.bz2
rneovim-6752f1005d26c93a033d856a60b7b296f3e51634.zip
docs: naming conventions, guidelines
close #21063
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 3a93005841..0f27040fd3 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1442,15 +1442,14 @@ ArrayOf(Dictionary) nvim_get_keymap(String mode)
/// or "!" for |:map!|, or empty string for |:map|.
/// @param lhs Left-hand-side |{lhs}| of the mapping.
/// @param rhs Right-hand-side |{rhs}| of the mapping.
-/// @param opts Optional parameters map: keys are |:map-arguments|, values are booleans (default
-/// false). Accepts all |:map-arguments| as keys excluding |<buffer>| but including
-/// |:noremap| and "desc". Unknown key is an error.
-/// "desc" can be used to give a description to the mapping.
-/// When called from Lua, also accepts a "callback" key that takes a Lua function to
-/// call when the mapping is executed.
-/// When "expr" is true, "replace_keycodes" (boolean) can be used to replace keycodes
-/// in the resulting string (see |nvim_replace_termcodes()|), and a Lua callback
-/// returning `nil` is equivalent to returning an empty string.
+/// @param opts Optional parameters map: Accepts all |:map-arguments| as keys except |<buffer>|,
+/// values are booleans (default false). Also:
+/// - "noremap" non-recursive mapping |:noremap|
+/// - "desc" human-readable description.
+/// - "callback" Lua function called when the mapping is executed.
+/// - "replace_keycodes" (boolean) When "expr" is true, replace keycodes in the
+/// resulting string (see |nvim_replace_termcodes()|). Returning nil from the Lua
+/// "callback" is equivalent to returning an empty string.
/// @param[out] err Error details, if any.
void nvim_set_keymap(uint64_t channel_id, String mode, String lhs, String rhs, Dict(keymap) *opts,
Error *err)