fix: don't deep merge keymaps (#510)
This commit is contained in:
parent
52cc8a1fb3
commit
709403ccd6
1 changed files with 8 additions and 1 deletions
|
|
@ -355,9 +355,16 @@ local M = {}
|
|||
---@field border? string|string[] Window border
|
||||
|
||||
M.setup = function(opts)
|
||||
local new_conf = vim.tbl_deep_extend("keep", opts or {}, default_config)
|
||||
opts = opts or {}
|
||||
local new_conf = vim.tbl_deep_extend("keep", opts, default_config)
|
||||
if not new_conf.use_default_keymaps then
|
||||
new_conf.keymaps = opts.keymaps or {}
|
||||
else
|
||||
-- We don't want to deep merge the keymaps, we want any keymap defined by the user to override
|
||||
-- everything about the default.
|
||||
for k, v in pairs(opts.keymaps) do
|
||||
new_conf.keymaps[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
if new_conf.lsp_rename_autosave ~= nil then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue