mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
perf(yanky): schedule_wrap
sqlite push to history to prevent blocking Neovim on copy/paste
This commit is contained in:
parent
3c04789ef1
commit
9047d041a8
1 changed files with 7 additions and 1 deletions
|
@ -4,7 +4,7 @@ return {
|
|||
"gbprod/yanky.nvim",
|
||||
dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {},
|
||||
opts = {
|
||||
highlight = { timer = 250 },
|
||||
highlight = { timer = 150 },
|
||||
ring = { storage = LazyVim.is_win() and "shada" or "sqlite" },
|
||||
},
|
||||
keys = {
|
||||
|
@ -28,5 +28,11 @@ return {
|
|||
{ "=p", "<Plug>(YankyPutAfterFilter)", desc = "Put After Applying a Filter" },
|
||||
{ "=P", "<Plug>(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("yanky").setup(opts)
|
||||
local sqlite = require("yanky.storage.sqlite")
|
||||
local push = sqlite.push
|
||||
sqlite.push = vim.schedule_wrap(push)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue