Skip to content

Commit 4dbc08f

Browse files
committed
fix: add support for snacks.nvim (#148)
1 parent 9197cf8 commit 4dbc08f

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lua/leetcode/logger/init.lua

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
local n_ok, notify = pcall(require, "notify")
2-
if n_ok then
3-
vim.notify = notify
4-
end
5-
61
local config = require("leetcode.config")
72
local t = require("leetcode.translator")
83
local lvls = vim.log.levels

lua/leetcode/logger/spinner/init.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ function spinner:set(msg, lvl, opts)
7373
end
7474
lvl = lvl or vim.log.levels.INFO
7575

76+
local id = self.noti and (self.noti.id or self.noti)
77+
7678
opts = vim.tbl_deep_extend("force", {
7779
hide_from_history = true,
7880
title = config.name,
7981
timeout = false,
80-
replace = self.noti,
82+
replace = id,
83+
id = id,
8184
}, opts or {})
8285

8386
self.noti = vim.notify(self.msg, lvl, opts)

0 commit comments

Comments
 (0)