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

Configure Feed

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

Update README.md

authored by

Patrick Dewey and committed by
GitHub
efa6cce7 719cab17

+24 -11
+24 -11
README.md
··· 24 24 ```lua 25 25 { 26 26 "ptdewey/yankbank-nvim", 27 - 28 - dependencies = "kkharji/sqlite.lua", 29 - 30 27 config = function() 31 28 require('yankbank').setup() 32 29 end, ··· 36 33 Packer: 37 34 ```lua 38 35 use { 39 - 'ptdewey/yankbank-nvim', 40 - requires = {'kkharji/sqlite.lua'} 36 + "ptdewey/yankbank-nvim", 41 37 config = function() 42 38 require('yankbank').setup() 43 39 end, ··· 58 54 | keymaps.yank | string | `"yy"` | 59 55 | keymaps.close | table of strings | `{ "<Esc>", "<C-c>", "q" }` | 60 56 | num_behavior | string defining jump behavior "prefix" or "jump" | `"prefix"` | 61 - | persist_type | string defining persistence type "sql" or "file" | `"sqlite"` | 62 - | persist_path | string defining path for persistence file | "/tmp/yankbank.db" | 57 + | persist_type | string defining persistence type "memory", "sql", or "file" | `"memory"` | 58 + | persist_path | string defining path for persistence file/db file | `"~/.local/share/nvim/lazy/yankbank-nvim"` (if installed with lazy) | 63 59 64 60 If no separator is desired, pass in an empty string for sep: 65 61 ```lua ··· 72 68 navigation_prev = "k", 73 69 }, 74 70 num_behavior = "prefix", 75 - persist_type = "sqlite", 76 - persist_path = "/tmp/yankbank.db", 71 + persist_type = "memory", 77 72 }) 78 73 end, 79 74 ``` 80 75 76 + 77 + 81 78 The 'num_behavior' option defines in-popup navigation behavior when hitting number keys. 82 79 - `num_behavior = "prefix"` works similar to traditional vim navigation with '3j' moving down 3 entries in the bank. 83 80 - `num_behavior = "jump"` jumps to entry matching the pressed number key (i.e. '3' jumps to entry 3) 84 81 - Note: If 'max_entries' is a two-digit number, there will be a delay upon pressing numbers that prefix a valid entry. 85 82 83 + #### Persistence 84 + If persistence between sessions is desired, there is a choice between a sqlite database and a file. 85 + Both file and sqlite will (by default) create a persistent store for recent yanks in the plugin root directory. 86 + File-based persistence requires no added dependencies, but to utilize sqlite, `"kkharji/sqlite.lua"` must be added as a dependency in your config: 87 + 88 + ```lua 89 + -- lazy 90 + return { 91 + "ptdewey/yankbank-nvim", 92 + dependencies = "kkharji/sqlite.lua", 93 + config = function() 94 + require('yankbank').setup({ 95 + persist_type = "sqlite" 96 + persist_path = "/tmp/yankbank.db", 97 + }) 98 + end, 99 + } 100 + ``` 86 101 87 102 ## Usage 88 103 ··· 97 112 98 113 99 114 ## Potential Improvements 100 - 101 - - Persistence between sessions (through either sqlite database or just a file) 102 115 - Polling on unnamedplus register to populate bank in more intuitive manner (could be enabled as option) 103 116 - nvim-cmp integration 104 117 - fzf integration