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.
This commit is contained in:
Christian Clason
2026-02-05 14:43:04 +01:00
committed by GitHub
parent 6f27eb1591
commit 13a9cdc6b4
2 changed files with 3 additions and 0 deletions

View File

@@ -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,

View File

@@ -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