issue #71, change warn/info/error to notify

This commit is contained in:
ray-x 2022-01-19 13:12:36 +11:00
parent a47e0c0858
commit 532f7256b1

View File

@ -351,7 +351,7 @@ function util.load_plugin(name, modulename)
has, plugin = pcall(require, modulename) has, plugin = pcall(require, modulename)
if not has then if not has then
util.warn("plugin failed to load " .. name) util.info("plugin " .. name .. " not loaded ")
return nil return nil
end end
return plugin return plugin
@ -396,15 +396,15 @@ end
-- log and messages -- log and messages
function util.warn(msg) function util.warn(msg)
vim.api.nvim_echo({ { "WRN: " .. msg, "WarningMsg" } }, true, {}) vim.notify("WARN: " .. msg, vim.lsp.log_levels.WARN)
end end
function util.error(msg) function util.error(msg)
vim.api.nvim_echo({ { "ERR: " .. msg, "ErrorMsg" } }, true, {}) vim.notify("ERR: " .. msg, vim.lsp.log_levels.ERROR)
end end
function util.info(msg) function util.info(msg)
vim.api.nvim_echo({ { "Info: " .. msg } }, true, {}) vim.notify("INF: " .. msg, vim.lsp.log_levels.INFO)
end end
function util.rel_path() function util.rel_path()