summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/snacks.lua
blob: 50f4ff206dbb8abadca29bb3d915de96006571a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
return {
    'folke/snacks.nvim',
    priority = 1000,
    lazy = false,
    ---@type snacks.Config
    opts = {
        image = {},
        ---@class snacks.notifier.Config
        notifier = {
            ---@type snacks.notifier.style
            style = 'compact',
            filter = function(notif)
                local filtered_messages = { 'No information available', 'No code actions available' }
                for _, msg in ipairs(filtered_messages) do
                    if notif.msg == msg then
                        return false
                    end
                end
                return true
            end,
        },
    },
    keys = {
        {
            '<leader>si',
            function()
                Snacks.image.hover()
            end,
        },
        {
            '<leader>nd',
            function()
                Snacks.notifier.hide()
            end,
            desc = '[N]otifications [D]ismiss All',
        },
        {
            '<leader>nh',
            function()
                Snacks.notifier.show_history()
            end,
            desc = '[N]otifications [D]ismiss All',
        },
    },
}