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

Configure Feed

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

opt persist type merged with existing logic in persistence.lua, README merged with existing logic

+4 -4
+1 -1
README.md
··· 54 54 | keymaps.yank | string | `"yy"` | 55 55 | keymaps.close | table of strings | `{ "<Esc>", "<C-c>", "q" }` | 56 56 | num_behavior | string defining jump behavior "prefix" or "jump" | `"prefix"` | 57 - | persist_type | string defining persistence type "sql" or "file" | `"sql"` | 57 + | persist_type | string defining persistence type "sql" or "file" | `"sqlite"` | 58 58 | persist_path | string defining path for persistence file | "/tmp/yankbank.db" | 59 59 60 60 If no separator is desired, pass in an empty string for sep:
+3 -3
lua/yankbank/persistence.lua
··· 10 10 -- - might need plenary for the asynchronous r/w accesses 11 11 12 12 function M.enable_persistence(yanks, opts) 13 - if not opts.method then 13 + if not opts.persist_type then 14 14 return 15 - elseif opts.method == "file" then 15 + elseif opts.persist_type == "file" then 16 16 -- TODO: 17 17 require("persistence.file").setup_persistence( 18 18 yanks, 19 19 opts.persist_path, 20 20 opts.max_entries 21 21 ) 22 - elseif opts.method == "sqlite" then 22 + elseif opts.persist_type == "sqlite" then 23 23 -- TODO: 24 24 require("persistence.sql").init_db(yanks, opts.persist_path) 25 25 end