Files
lua-nvim/lua/cargdev/plugins/yanky.lua
2026-02-01 21:00:06 -05:00

44 lines
1.3 KiB
Lua

return {
"gbprod/yanky.nvim",
dependencies = { "kkharji/sqlite.lua" },
event = { "BufReadPost", "BufNewFile" },
opts = {
ring = {
history_length = 100,
storage = "sqlite",
sync_with_numbered_registers = true,
cancel_event = "update",
},
picker = {
select = {
action = nil,
},
telescope = {
use_default_mappings = true,
mappings = nil,
},
},
system_clipboard = {
sync_with_ring = true,
},
highlight = {
on_put = true,
on_yank = true,
timer = 200,
},
preserve_cursor_position = {
enabled = true,
},
},
keys = {
{ "y", "<Plug>(YankyYank)", mode = { "n", "x" }, desc = "Yank" },
{ "p", "<Plug>(YankyPutAfter)", mode = { "n", "x" }, desc = "Put after" },
{ "P", "<Plug>(YankyPutBefore)", mode = { "n", "x" }, desc = "Put before" },
{ "gp", "<Plug>(YankyGPutAfter)", mode = { "n", "x" }, desc = "GPut after" },
{ "gP", "<Plug>(YankyGPutBefore)", mode = { "n", "x" }, desc = "GPut before" },
{ "]p", "<Plug>(YankyPutIndentAfterLinewise)", desc = "Put indented after" },
{ "[p", "<Plug>(YankyPutIndentBeforeLinewise)", desc = "Put indented before" },
{ "<leader>yh", "<cmd>YankyRingHistory<cr>", desc = "Yank history" },
},
}