mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
18 lines
398 B
Lua
18 lines
398 B
Lua
|
local status_ok, yanky = pcall(require, "yanky")
|
||
|
if not status_ok then
|
||
|
return
|
||
|
end
|
||
|
yanky.setup({
|
||
|
ring = {
|
||
|
history_length = 50,
|
||
|
storage = "memory",
|
||
|
},
|
||
|
preserve_cursor_position = {
|
||
|
enabled = false,
|
||
|
},
|
||
|
})
|
||
|
|
||
|
-- cycle through the yank history, only work after paste
|
||
|
vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
|
||
|
vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")
|