feat: cleanup keys/cmd handlers when loading a plugin

This commit is contained in:
Folke Lemaitre 2022-12-03 23:15:50 +01:00
parent c98e722fa4
commit 3f517abfa4
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
6 changed files with 154 additions and 99 deletions

View file

@ -161,7 +161,14 @@ end
---@param msg string|string[]
function M.notify(msg, level)
msg = type(msg) == "table" and table.concat(msg, "\n") or msg
if type(msg) == "table" then
msg = table.concat(
vim.tbl_filter(function(line)
return line or false
end, msg),
"\n"
)
end
vim.notify(msg, level, {
on_open = function(win)
vim.wo[win].conceallevel = 3