fix(_utils): set notification level

This commit is contained in:
Smirnov Oleksandr 2022-06-27 14:30:02 +03:00
parent 2adbb49064
commit ebb3894b3b

View file

@ -38,10 +38,19 @@ return {
end, end,
---@param msg string ---@param msg string
---@param lvl string ---@param lvl string|integer
notify = function(msg, lvl) notify = function(msg, lvl)
local l
if lvl == "error" or lvl == 4 then
l = vim.log.levels.ERROR
elseif lvl == "info" or lvl == 2 then
l = vim.log.levels.INFO
elseif lvl == "debug" or lvl == 1 then
l = vim.log.levels.DEBUG
end
vim.defer_fn(function() vim.defer_fn(function()
vim.notify(msg, lvl) vim.notify(msg, l)
end, 0) end, 0)
end, end,
} }