summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/yanky.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/yanky.lua')
-rw-r--r--.config/nvim/lua/plugins/yanky.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/yanky.lua b/.config/nvim/lua/plugins/yanky.lua
new file mode 100644
index 0000000..be90ccf
--- /dev/null
+++ b/.config/nvim/lua/plugins/yanky.lua
@@ -0,0 +1,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,
+ },
+}
+