refactor: simplified handler code

This commit is contained in:
Folke Lemaitre 2022-12-16 09:13:08 +01:00
commit ecf03a6892
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
7 changed files with 58 additions and 91 deletions

View file

@ -242,8 +242,6 @@ function M:reason(reason, opts)
end
if key == "event" then
value = value:match("User (.*)") or value
elseif key == "ft" then
value = value:match("FileType (.*)") or value
end
local hl = "LazyHandler" .. key:sub(1, 1):upper() .. key:sub(2)
local icon = Config.options.ui.icons[key]