commit 13a9cdc6b4d10d4e840c1b940d061a242adbef21
parent 6f27eb1591d18e6632845e088143270489155464
Author: Christian Clason <c.clason@uni-graz.at>
Date: Thu, 5 Feb 2026 14:43:04 +0100
docs(lua): vim.keymap.set takes no `noremap` #37723
Problem: Unlike `nvim_keymap_set`, `vim.keymap.set` uses the non-negated
`remap` instead of `:set`'s `noremap`, but the documentation for this
got lost sometime before Nvim 0.10.
Solution: Restore the lost documentation and make it more explicit.
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
@@ -3482,6 +3482,8 @@ vim.keymap.set({modes}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
• {opts} (`table?`) Table of |:map-arguments|. Same as
|nvim_set_keymap()| {opts}, except:
• {replace_keycodes} defaults to `true` if "expr" is `true`.
+ • {noremap} is not supported; use {remap} instead (see
+ below).
Also accepts:
• {buffer}? (`integer|boolean`) Creates buffer-local mapping,
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua
@@ -3,6 +3,7 @@ local keymap = {}
--- Table of |:map-arguments|.
--- Same as |nvim_set_keymap()| {opts}, except:
--- - {replace_keycodes} defaults to `true` if "expr" is `true`.
+--- - {noremap} is not supported; use {remap} instead (see below).
---
--- Also accepts:
--- @class vim.keymap.set.Opts : vim.api.keyset.keymap