fix(lua): drop support for boolean buf in vim.keymap #38432

Problem:
`vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely
used `integer?` values, `true` -> `0` and `false` -> `nil`. This
conversion is unnecessary and can be handled at call sites.

Solution:
As a follow-up to deprecating the `buffer` option, drop support for
boolean values for the new `buf` option. The deprecated `buffer`
continues to support booleans for backward compatibility.
This commit is contained in:
skewb1k
2026-03-23 12:00:53 +00:00
committed by GitHub
parent 4ed597389c
commit 9a5641b4b5
8 changed files with 23 additions and 26 deletions

View File

@@ -2018,7 +2018,7 @@ function vim.api.nvim_parse_expression(expr, flags, highlight) end
--- line2
--- line3
--- ]], false, -1)
--- end, { buf = true })
--- end, { buf = 0 })
--- ```
---
--- @param data string Multiline input. Lines break at LF ("\n"). May be binary (containing NUL bytes).