diff --git a/lua/leetcode/logger/init.lua b/lua/leetcode/logger/init.lua index a10c833..8908c32 100644 --- a/lua/leetcode/logger/init.lua +++ b/lua/leetcode/logger/init.lua @@ -1,8 +1,3 @@ -local n_ok, notify = pcall(require, "notify") -if n_ok then - vim.notify = notify -end - local config = require("leetcode.config") local t = require("leetcode.translator") local lvls = vim.log.levels diff --git a/lua/leetcode/logger/spinner/init.lua b/lua/leetcode/logger/spinner/init.lua index ae19c39..569c353 100644 --- a/lua/leetcode/logger/spinner/init.lua +++ b/lua/leetcode/logger/spinner/init.lua @@ -73,11 +73,14 @@ function spinner:set(msg, lvl, opts) end lvl = lvl or vim.log.levels.INFO + local id = self.noti and (self.noti.id or self.noti) + opts = vim.tbl_deep_extend("force", { hide_from_history = true, title = config.name, timeout = false, - replace = self.noti, + replace = id, + id = id, }, opts or {}) self.noti = vim.notify(self.msg, lvl, opts)