···11-*yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 June 14
11+*yankbank-nvim.txt* For Neovim >= 0.7.0 Last change: 2024 August 24
2233==============================================================================
44Table of Contents *yankbank-nvim-table-of-contents*
···54545555>lua
5656 use {
5757- 'ptdewey/yankbank-nvim',
5757+ "ptdewey/yankbank-nvim",
5858 config = function()
5959 require('yankbank').setup()
6060 end,
···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 | `{ }` | |
7878-registers.yank_register | default register to yank from popup to | `"+"` |
7878+registers.yank_register | default register to yank from popup to | `"+"` | |
7979+persist_type | string defining persistence type "memory" or "sqlite" |
8080+`"memory"` | | persist_path | string defining path for persistence file/db file
8181+| `"~/.local/share/nvim/lazy/yankbank-nvim"` (if installed with lazy) |
798280838184EXAMPLE CONFIGURATION
···9194 navigation_next = "j",
9295 navigation_prev = "k",
9396 },
9797+ num_behavior = "prefix",
9898+ persist_type = "sqlite",
9499 registers = {
95100 yank_register = "+",
96101 },
···107112entry 3) - Note: If 'max_entries' is a two-digit number, there will be a delay
108113upon pressing numbers that prefix a valid entry.
109114110110-The 'focus_gain_poll' option allows for enabling an additional autocommand that
115115+116116+PERSISTENCE
117117+118118+If persistence between sessions is desired, sqlite.lua will be used to create a
119119+persistent store for recent yanks in the plugin root directory. To utilize
120120+sqlite persistence, `"kkharji/sqlite.lua"` must be added as a dependency in
121121+your config, and `persist_type` must be set to `"sqlite"`
122122+123123+>lua
124124+ -- lazy
125125+ return {
126126+ "ptdewey/yankbank-nvim",
127127+ dependencies = "kkharji/sqlite.lua",
128128+ config = function()
129129+ require('yankbank').setup({
130130+ -- other options...
131131+ persist_type = "sqlite"
132132+ })
133133+ end,
134134+ }
135135+<
136136+137137+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
···132159133160POTENTIAL IMPROVEMENTS *yankbank-nvim-yankbank-potential-improvements*
134161135135-- Persistence between sessions (through either sqlite database or just a file)
162162+- Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option)
136163- nvim-cmp integration
137164- fzf integration
165165+- telescope integration
138166139167140168ALTERNATIVES *yankbank-nvim-yankbank-alternatives*