feat(snacks.picker): use snacks picker for notifications when enabled

This commit is contained in:
Folke Lemaitre 2025-01-28 17:22:17 +01:00
parent 132986a624
commit 01a70cc60e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 8 additions and 1 deletions

View file

@ -278,7 +278,13 @@ return {
},
-- stylua: ignore
keys = {
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
{ "<leader>n", function()
if Snacks.config.picker and Snacks.config.picker.enabled then
Snacks.picker.notifications()
else
Snacks.notifier.show_history()
end
end, desc = "Notification History" },
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
},
},