summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/plugins/mini-pick.lua
blob: 25f88dedafad7d3748435eed16146b677b39eee2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
return {
  "mini.pick",
  lazy = true,
  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
}