Skip to content

Commit

Permalink
fix: add support for snacks.nvim (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
kawre committed Dec 2, 2024
1 parent 9197cf8 commit 4dbc08f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 0 additions & 5 deletions lua/leetcode/logger/init.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 4 additions & 1 deletion lua/leetcode/logger/spinner/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4dbc08f

Please # to comment.