From 83cd3cc2306f0ef1f37f3822097e48090d525681 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Fri, 7 Oct 2022 10:25:36 +0200 Subject: [PATCH] nvim: install yanky --- .config/nvim/lua/plugins.lua | 7 +++++++ .config/nvim/lua/plugins/yanky.lua | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .config/nvim/lua/plugins/yanky.lua diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index a1f0614..82de12a 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -28,6 +28,13 @@ return require("packer").startup(function() end, }) + use({ + "gbprod/yanky.nvim", + config = function() + require("plugins/yanky") + end, + }) + use({ "b3nj5m1n/kommentary", config = function() diff --git a/.config/nvim/lua/plugins/yanky.lua b/.config/nvim/lua/plugins/yanky.lua new file mode 100644 index 0000000..0e02bdb --- /dev/null +++ b/.config/nvim/lua/plugins/yanky.lua @@ -0,0 +1,10 @@ +local yanky = require("yanky") +yanky.setup({}) + +vim.keymap.set({ "n", "x" }, "p", "(YankyPutAfter)") +vim.keymap.set({ "n", "x" }, "P", "(YankyPutBefore)") +vim.keymap.set({ "n", "x" }, "gp", "(YankyGPutAfter)") +vim.keymap.set({ "n", "x" }, "gP", "(YankyGPutBefore)") + +vim.keymap.set("n", "", "(YankyCycleForward)") +vim.keymap.set("n", "", "(YankyCycleBackward)")