]> git.rmz.io Git - dotfiles.git/commitdiff
nvim: provide wrappers to lazy.core.util.{error,warn,info}
authorSamir Benmendil <me@rmz.io>
Sat, 1 Mar 2025 01:18:39 +0000 (01:18 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 2 Mar 2025 16:05:28 +0000 (16:05 +0000)
nvim/lua/rmz/util/lazy.lua

index 9a64c6908b9e84c2fcab1d99c4736d50e5ffddc9..81a5534128b2465196065806c589c1f9ebd2fbcf 100644 (file)
@@ -16,4 +16,13 @@ function M.opts(name)
   return Plugin.values(plugin, "opts", false)
 end
 
   return Plugin.values(plugin, "opts", false)
 end
 
+for _, level in ipairs({ "info", "warn", "error" }) do
+  M[level] = function(msg, opts)
+    opts = opts or {}
+    opts.title = opts.title or "RmZ"
+    local Util = require("lazy.core.util")
+    return Util[level](msg, opts)
+  end
+end
+
 return M
 return M