Neovim plugin improving access to clipboard history (mirror)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: auto-generate vimdoc

+55 -1
+55 -1
doc/yankbank-nvim.txt
··· 1 - *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2025 August 14 1 + *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2025 August 15 2 2 3 3 ============================================================================== 4 4 Table of Contents *yankbank-nvim-table-of-contents* ··· 53 53 { 54 54 "ptdewey/yankbank-nvim", 55 55 dependencies = "kkharji/sqlite.lua", 56 + cmd = { "YankBank" }, 56 57 config = function() 57 58 require('yankbank').setup({ 58 59 persist_type = "sqlite", ··· 69 70 >lua 70 71 { 71 72 "ptdewey/yankbank-nvim", 73 + cmd = { "YankBank" }, 72 74 config = function() 73 75 require('yankbank').setup() 74 76 end, 77 + } 78 + < 79 + 80 + 81 + LAZY LOADING 82 + 83 + Per best practices 84 + <https://github.com/nvim-neorocks/nvim-best-practices?tab=readme-ov-file#sleeping_bed-lazy-loading>, 85 + YankBank’s initialization footprint is very minimal, and functionalities are 86 + only loaded when they are needed. As such, I set `lazy=false` in my config, and 87 + get a startup time of <1ms. 88 + 89 + >lua 90 + -- plugins/yankbank.lua 91 + return { 92 + { 93 + "ptdewey/yankbank-nvim", 94 + lazy = false, 95 + config = function() 96 + -- ... 97 + end, 98 + }, 99 + { 100 + "kkharji/sqlite.lua", 101 + lazy = true, 102 + }, 103 + } 104 + < 105 + 106 + If you don’t want to load YankBank on startup, I previously loaded it on 107 + keypresses that yank text (`y`, `Y`, `d`, `D`, `x`), the `FocusGained` event, 108 + and the `YankBank` command. 109 + 110 + >lua 111 + { 112 + "ptdewey/yankbank-nvim", 113 + dependencies = "kkharji/sqlite.lua", 114 + keys = { 115 + { "y" }, 116 + { "Y", "y$" }, -- redefine Y behavior to y$ to avoid breaking lazy 117 + { "D" }, 118 + { "d" }, 119 + { "x" }, 120 + { "<leader>p", desc = "Open YankBank" }, 121 + }, 122 + cmd = { "YankBank" }, 123 + event = { "FocusGained" }, 124 + config = function() 125 + require("yankbank").setup({ 126 + -- ... 127 + }) 128 + end 75 129 } 76 130 < 77 131