Refresh generated nvim config
This commit is contained in:
15
config/neovim/store/lazy-plugins/yanky.nvim/doc/tags
Normal file
15
config/neovim/store/lazy-plugins/yanky.nvim/doc/tags
Normal file
@ -0,0 +1,15 @@
|
||||
yanky-links yanky.txt /*yanky-links*
|
||||
yanky-table-of-contents yanky.txt /*yanky-table-of-contents*
|
||||
yanky-🍃-yanky.nvim yanky.txt /*yanky-🍃-yanky.nvim*
|
||||
yanky-🍃-yanky.nvim-⚓-text-object yanky.txt /*yanky-🍃-yanky.nvim-⚓-text-object*
|
||||
yanky-🍃-yanky.nvim-⚙️-configuration yanky.txt /*yanky-🍃-yanky.nvim-⚙️-configuration*
|
||||
yanky-🍃-yanky.nvim-⚡️-requirements yanky.txt /*yanky-🍃-yanky.nvim-⚡️-requirements*
|
||||
yanky-🍃-yanky.nvim-✨-features yanky.txt /*yanky-🍃-yanky.nvim-✨-features*
|
||||
yanky-🍃-yanky.nvim-⭐-special-put yanky.txt /*yanky-🍃-yanky.nvim-⭐-special-put*
|
||||
yanky-🍃-yanky.nvim-🎉-credits yanky.txt /*yanky-🍃-yanky.nvim-🎉-credits*
|
||||
yanky-🍃-yanky.nvim-🎨-colors yanky.txt /*yanky-🍃-yanky.nvim-🎨-colors*
|
||||
yanky-🍃-yanky.nvim-📜-yank-history-picker yanky.txt /*yanky-🍃-yanky.nvim-📜-yank-history-picker*
|
||||
yanky-🍃-yanky.nvim-📦-installation yanky.txt /*yanky-🍃-yanky.nvim-📦-installation*
|
||||
yanky-🍃-yanky.nvim-🖇️-yank-ring yanky.txt /*yanky-🍃-yanky.nvim-🖇️-yank-ring*
|
||||
yanky-🍃-yanky.nvim-🤝-integrations yanky.txt /*yanky-🍃-yanky.nvim-🤝-integrations*
|
||||
yanky.txt yanky.txt /*yanky.txt*
|
||||
@ -12,33 +12,33 @@ function system_clipboard.setup()
|
||||
system_clipboard.history = require("yanky.history")
|
||||
|
||||
if system_clipboard.config.sync_with_ring then
|
||||
local yanky_clipboard_augroup = vim.api.nvim_create_augroup("YankySyncClipboard", { clear = true })
|
||||
local fetching = false
|
||||
vim.api.nvim_create_autocmd("FocusGained", {
|
||||
group = yanky_clipboard_augroup,
|
||||
pattern = "*",
|
||||
callback = function(_)
|
||||
if fetching then
|
||||
return
|
||||
local focused_real = true -- realtime state of focus
|
||||
local focused_delayed = true -- delayed state of focus
|
||||
|
||||
local timer = nil
|
||||
vim.api.nvim_create_autocmd({ "FocusGained", "FocusLost" }, {
|
||||
group = vim.api.nvim_create_augroup("YankySyncClipboard", { clear = true }),
|
||||
callback = function(ev)
|
||||
if ev.event == "FocusLost" then
|
||||
focused_real = false
|
||||
if timer then
|
||||
timer:stop()
|
||||
end
|
||||
timer = vim.defer_fn(function()
|
||||
if not focused_real then -- still not focused
|
||||
system_clipboard.on_focus_lost()
|
||||
focused_delayed = false
|
||||
end
|
||||
end, 500)
|
||||
elseif ev.event == "FocusGained" then
|
||||
if not focused_delayed then
|
||||
system_clipboard.on_focus_gained()
|
||||
end
|
||||
focused_real = true
|
||||
focused_delayed = true
|
||||
end
|
||||
fetching = true
|
||||
local ok, err = pcall(system_clipboard.on_focus_gained)
|
||||
vim.schedule(function()
|
||||
fetching = false
|
||||
end)
|
||||
if not ok then
|
||||
error(err)
|
||||
end
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FocusLost", {
|
||||
group = yanky_clipboard_augroup,
|
||||
pattern = "*",
|
||||
callback = function(_)
|
||||
if fetching then
|
||||
return
|
||||
end
|
||||
system_clipboard.on_focus_lost()
|
||||
-- don't execute focus autocmds while fetching the clipboard,
|
||||
-- since clipboard tools can steal focus
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user