mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
feat(lua): replace buffer with buf in vim.keymap.set/del #38360
The `buffer` option remains functional but is now undocumented. Providing both will raise an error. Since providing `buf` was disallowed before, there is no code that will break due to using `buffer` alongside `buf`.
This commit is contained in:
@@ -462,12 +462,12 @@ function M.signature_help(config)
|
||||
vim.keymap.set('n', '<Plug>(nvim.lsp.ctrl-s)', function()
|
||||
show_signature(fwin)
|
||||
end, {
|
||||
buffer = fbuf,
|
||||
buf = fbuf,
|
||||
desc = 'Cycle next signature',
|
||||
})
|
||||
if vim.fn.hasmapto('<Plug>(nvim.lsp.ctrl-s)', 'n') == 0 then
|
||||
vim.keymap.set('n', '<C-s>', '<Plug>(nvim.lsp.ctrl-s)', {
|
||||
buffer = fbuf,
|
||||
buf = fbuf,
|
||||
desc = 'Cycle next signature',
|
||||
})
|
||||
end
|
||||
|
||||
@@ -1376,7 +1376,7 @@ local function reset_defaults(bufnr)
|
||||
vim._with({ buf = bufnr }, function()
|
||||
local keymap = vim.fn.maparg('K', 'n', false, true)
|
||||
if keymap and keymap.callback == lsp.buf.hover and keymap.buffer == 1 then
|
||||
vim.keymap.del('n', 'K', { buffer = bufnr })
|
||||
vim.keymap.del('n', 'K', { buf = bufnr })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user