summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/mini-pick.lua
blob: c08c1ded9ac7dedf3983b29f1418d49c1b7b3b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
return {
  "mini.pick",
  cmd = "Pick",
  after = function()
    local win_config = function()
      local height = math.floor(0.618 * vim.o.lines)
      local width = math.floor(0.618 * vim.o.columns)
      return {
        anchor = 'NW', height = height, width = width,
        row = math.floor(0.5 * (vim.o.lines - height)),
        col = math.floor(0.5 * (vim.o.columns - width)),
      }
    end
    require("mini.pick").setup {
      window = {
        config = win_config,
      },
    }
    vim.cmd.packadd("mini.extra")
    require("mini.extra").setup()
  end
}