From b2673f105704eb6f9d553bd1a7f66f2576f266b8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 4 Jan 2023 00:27:31 +0100 Subject: [PATCH] style: debug formatting --- lua/lazy/core/cache.lua | 4 ++-- lua/lazy/core/util.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/lazy/core/cache.lua b/lua/lazy/core/cache.lua index 3efcb55..e67b1af 100644 --- a/lua/lazy/core/cache.lua +++ b/lua/lazy/core/cache.lua @@ -118,7 +118,7 @@ end ---@param msg string|table ---@param level? number ----@param opts? {lang?:string, title?:string} +---@param opts? {lang:string, title:string} function M.log(msg, level, opts) if M.debug then msg = vim.deepcopy(msg) @@ -208,7 +208,7 @@ function M.load(modkey, modpath) entry.hash = hash if M.debug then - M.log("`" .. modpath .. "`", nil, { title = "Cache.load" }) + M.log("`" .. modpath .. "`", vim.log.levels.WARN, { title = "Cache.load" }) end chunk, err = M._loadfile(entry.modpath) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index b1ba858..f1784d6 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -216,7 +216,7 @@ function M.lsmod(modname, fn) end ---@param msg string|string[] ----@param opts? {lang?:string, title?:string} +---@param opts? {lang:string, title:string} function M.notify(msg, level, opts) if vim.in_fast_event() then vim.schedule(function() @@ -268,14 +268,14 @@ end ---@param msg string|table ---@param level? number ----@param opts? {lang?:string, title?:string} +---@param opts? {lang:string, title:string} function M.debug(msg, level, opts) if not require("lazy.core.config").options.debug then return end opts = opts or {} if type(msg) == "string" then - M.notify(msg, level) + M.notify(msg, level, opts) else opts.lang = "lua" M.notify(vim.inspect(msg), level, opts)