-- ============================================================================ -- YANKY: Better yank/paste -- ============================================================================ -- Enhanced yank and paste with a persistent yank ring stored in SQLite. -- Cycle through yank history with / after pasting. Preserves yanks -- across sessions and syncs with numbered registers for seamless workflow. -- ============================================================================ 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", "(YankyYank)", mode = { "n", "x" }, desc = "Yank" }, { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put after" }, { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put before" }, { "gp", "(YankyGPutAfter)", mode = { "n", "x" }, desc = "GPut after" }, { "gP", "(YankyGPutBefore)", mode = { "n", "x" }, desc = "GPut before" }, { "]p", "(YankyPutIndentAfterLinewise)", desc = "Put indented after" }, { "[p", "(YankyPutIndentBeforeLinewise)", desc = "Put indented before" }, { "yh", "YankyRingHistory", desc = "Yank history" }, }, }