summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/yanky.lua
blob: be90ccf9ab5c87c7ecd17cb5084c4c8c24530ff9 (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
return {
  {
    "gbprod/yanky.nvim",
    keys = {
      { "p", "<Plug>(YankyPutAfter)", desc = "Put after cursor", mode = { "n", "x" } },
      { "P", "<Plug>(YankyPutBefore)", desc = "Put before cursor", mode = { "n", "x" } },
      { "gp", "<Plug>(YankyGPutAfter)", desc = "Put after cursor", mode = { "n", "x" } },
      { "gP", "<Plug>(YankyGPutBefore)", desc = "Put before cursor", mode = { "n", "x" } },
      { "<C-n>", "<Plug>(YankyCycleForward)", desc = "Next yank" },
      { "<C-p>", "<Plug>(YankyCycleBackward)", desc = "Previous yank" },
    },
    opts = {},
  },
  {
    "nvim-telescope/telescope.nvim",
    dependencies = { "gbprod/yanky.nvim" },
    keys = {
      { "<leader>fy", "<cmd>Telescope yank_history<cr>", desc = "Yank history" },
    },
    cmd = "Telescope yank_history",
    config = function()
      require("telescope").load_extension("yank_history")
    end,
  },
}