summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/edgy.lua
blob: f84d0ba3303d8f231e0aeafdf46b5f7158ee4c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
return {
    'folke/edgy.nvim',
    event = 'VeryLazy',
    opts = function(_, opts)
        for _, pos in ipairs({ 'top', 'bottom', 'left', 'right' }) do
            opts[pos] = opts[pos] or {}
            table.insert(opts[pos], {
                ft = 'snacks_terminal',
                size = { height = 0.4 },
                title = '%{b:snacks_terminal.id}: %{b:term_title}',
                filter = function(_buf, win)
                    return vim.w[win].snacks_win
                        and vim.w[win].snacks_win.position == pos
                        and vim.w[win].snacks_win.relative == 'editor'
                        and not vim.w[win].trouble_preview
                end,
            })
        end
    end,
}