fix(_utils): set notification level
This commit is contained in:
parent
2adbb49064
commit
ebb3894b3b
1 changed files with 11 additions and 2 deletions
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue