dotfiles/.config/nvim/lua/config/plugins/yanky.lua

24 lines
600 B
Lua

local M = {
"folke/yanky.nvim",
}
function M.config()
require("yanky").setup({
ring = {
history_length = 100,
storage = "memory",
sync_with_numbered_registers = false,
cancel_event = "update",
},
})
vim.keymap.set({ "n", "x" }, "p", "<Plug>(YankyPutAfter)")
vim.keymap.set({ "n", "x" }, "P", "<Plug>(YankyPutBefore)")
vim.keymap.set({ "n", "x" }, "gp", "<Plug>(YankyGPutAfter)")
vim.keymap.set({ "n", "x" }, "gP", "<Plug>(YankyGPutBefore)")
vim.keymap.set("n", "<c-p>", "<Plug>(YankyCycleForward)")
vim.keymap.set("n", "<c-n>", "<Plug>(YankyCycleBackward)")
end
return M