perf(yanky): schedule_wrap
sqlite push to history to prevent blocking Neovim on copy/paste
This commit is contained in:
@ -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,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user