aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/general.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/general.lua')
-rw-r--r--.config/nvim/lua/general.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/nvim/lua/general.lua b/.config/nvim/lua/general.lua
index 8864a2e..f50f538 100644
--- a/.config/nvim/lua/general.lua
+++ b/.config/nvim/lua/general.lua
@@ -55,5 +55,13 @@ if vim.fn.has("wsl") == 1 then
group = vim.api.nvim_create_augroup("Yank", { clear = true });
callback = function() vim.fn.system("clip.exe", vim.fn.getreg("\"")) end;
})
+else
+ vim.api.nvim_create_autocmd('TextYankPost', {
+ callback = function()
+ if vim.v.event.operator == 'y' and vim.v.event.regname == '+' then
+ require('osc52').copy_register('+')
+ end
+ end
+ })
end