From 13a9cdc6b4d10d4e840c1b940d061a242adbef21 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 5 Feb 2026 14:43:04 +0100 Subject: [PATCH] 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. --- runtime/doc/lua.txt | 2 ++ runtime/lua/vim/keymap.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index e855f2a59e..0aebcaf98b 100644 --- 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 index 9273ebf2f4..8464f68a37 100644 --- 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