Skip to content

Commit

Permalink
fix(notifications): remove duplicate icon when using nvim-notify
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 2, 2024
1 parent 6692725 commit 7e9b84c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/rip-substitute/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ local M = {}
function M.notify(msg, level)
if not level then level = "info" end
local icon = require("rip-substitute.config").config.notification.icon
local opts = { title = "rip-substitute", icon = icon }

-- since nvim-notify does not support the `icon` field that snacks.nvim
if package.loaded["notify"] then opts.title = vim.trim(icon .. opts.title) end

vim.notify(msg, vim.log.levels[level:upper()], opts)
vim.notify(msg, vim.log.levels[level:upper()], { title = "rip-substitute", icon = icon })
end

---@return number startLnum
Expand Down

0 comments on commit 7e9b84c

Please sign in to comment.