1- *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 June 14
1+ *yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 August 24
22
33==============================================================================
44Table of Contents *yankbank-nvim-table-of-contents*
@@ -54,7 +54,7 @@ Packer:
5454
5555>lua
5656 use {
57- ' ptdewey/yankbank-nvim' ,
57+ " ptdewey/yankbank-nvim" ,
5858 config = function()
5959 require('yankbank' ).setup()
6060 end,
@@ -75,7 +75,10 @@ containing keymap overrides | `{}` | | keymaps.navigation_next | string | `"j"`
7575strings | `{ "<Esc> ", "<C-c> ", "q" }` | | num_behavior | string defining jump
7676behavior "prefix" or "jump" | `" prefix" ` | | focus_gain_poll | boolean | `nil`
7777| | registers | table container for register overrides | `{ }` | |
78- registers.yank_register | default register to yank from popup to | `" +" ` |
78+ registers.yank_register | default register to yank from popup to | `" +" ` | |
79+ persist_type | string defining persistence type "memory" or "sqlite" |
80+ `" memory" ` | | persist_path | string defining path for persistence file/db file
81+ | `" ~/.local/share/nvim/lazy/yankbank-nvim" ` (if installed with lazy) |
7982
8083
8184EXAMPLE CONFIGURATION
@@ -91,6 +94,8 @@ EXAMPLE CONFIGURATION
9194 navigation_next = "j",
9295 navigation_prev = "k",
9396 },
97+ num_behavior = "prefix",
98+ persist_type = "sqlite",
9499 registers = {
95100 yank_register = "+",
96101 },
@@ -107,7 +112,29 @@ navigation with '3j' moving down 3 entries in the bank. - `num_behavior =
107112entry 3) - Note: If 'max_entries' is a two-digit number, there will be a delay
108113upon pressing numbers that prefix a valid entry.
109114
110- The 'focus_gain_poll' option allows for enabling an additional autocommand that
115+
116+ PERSISTENCE
117+
118+ If persistence between sessions is desired, sqlite.lua will be used to create a
119+ persistent store for recent yanks in the plugin root directory. To utilize
120+ sqlite persistence, `" kkharji/sqlite.lua" ` must be added as a dependency in
121+ your config, and `persist_type` must be set to `" sqlite" `
122+
123+ >lua
124+ -- lazy
125+ return {
126+ "ptdewey/yankbank-nvim",
127+ dependencies = "kkharji/sqlite.lua",
128+ config = function()
129+ require('yankbank' ).setup({
130+ -- other options...
131+ persist_type = "sqlite"
132+ })
133+ end,
134+ }
135+ <
136+
137+ The'focus_gain_poll' option allows for enabling an additional autocommand that
111138watches for focus gains (refocusing Neovim window), and checks for changes in
112139the unnamedplus ('+') register, adding to yankbank when new contents are found.
113140This allows for automatically adding text copied from other sources (like a
@@ -132,9 +159,10 @@ I would personally also recommend setting a keybind to open the menu.
132159
133160POTENTIAL IMPROVEMENTS *yankbank-nvim-yankbank-potential-improvements*
134161
135- - Persistence between sessions (through either sqlite database or just a file )
162+ - Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option )
136163- nvim-cmp integration
137164- fzf integration
165+ - telescope integration
138166
139167
140168ALTERNATIVES *yankbank-nvim-yankbank-alternatives*
0 commit comments