feat(keys): refactor code and allow disabling keymaps per mode. mode no longer needs to be exactly the same in order to disable.

This commit is contained in:
Folke Lemaitre 2023-10-08 10:11:25 +02:00
parent 62745a7320
commit b79099cc9d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 68 additions and 35 deletions

View file

@ -331,7 +331,7 @@ function M:reason(reason, opts)
value = value:match("User (.*)") or value
end
if key == "keys" then
value = type(value) == "string" and value or value[1]
value = type(value) == "string" and value or value.lhs
end
local hl = "LazyReason" .. key:sub(1, 1):upper() .. key:sub(2)
local icon = Config.options.ui.icons[key]