fix(keymaps): silent by default

This commit is contained in:
Folke Lemaitre 2023-02-06 08:35:11 +01:00
parent d905ff08b9
commit e5626e9a2d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -7,6 +7,8 @@ local function map(mode, lhs, rhs, opts)
---@cast keys LazyKeysHandler
-- do not create the keymap if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {}
opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts)
end
end